473,804 Members | 3,433 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

runtime error to stderr or ? (gcc ubuntu bash)

$ ./test_fail
1
Floating point exception
- but this leaves 'somefile' zero size

$ ./test_fail 1>somefile
Floating point exception
- and this leaves 'somefile' zero size

$ ./test_fail 2>somefile
1
Floating point exception
- why doesn't 'Floating point exception' go to stderr?

#include <stdio.h>

int main(){
printf("%d\n",1 );
printf("%d\n",2/0);
return 0;
}

Jul 20 '08
10 4456
On 20 Jul 2008 at 8:14, Chris Torek wrote:
The "; true" is required, at least on my Linux box. (Actually any
command should suffice.)
I believe : is the conventional shell NOP?

Jul 26 '08 #11

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
3160
by: Tony | last post by:
bash-2.03# /configure --with-apxs=/usr/local/apache/bin/apxs --with-zlib=/usr /local --with-db3=/opt/sfw --with-openssl=/usr/local/ssl/ --enable-module=so loading cache ./config.cache checking host system type... i386-pc-solaris2.8 checking for gcc... gcc checking whether the C compiler (gcc ) works... yes checking whether the C compiler (gcc ) is a cross-compiler... no checking whether we are using GNU C... yes checking whether gcc...
17
5129
by: abdur_rab7 | last post by:
Hi, I am compiling code for nanosleep in CYGWIN. During compilation i get the following error Socket.cc: In method `bool Socket::hangOnConnection(int = 0)': Socket.cc:338: aggregate `struct timespec tmsp' has incomplete type and cannot b e initialized
2
2115
by: etienne | last post by:
Hello, I'm trying to compile this C++ code with gcc 3.4.5 under Solaris/SPARC (from a complete application, the file is : FullLinkedList.hh) but the make fails (no problem when compiling under ubuntu/x86) : (from line 330 to 481) /***************************************************************************** * ITERATOR SECTION - INNER CLASSES
21
5251
by: Paul Edwards | last post by:
I have written a public domain (not GPL etc) C runtime library (PDPCLIB) for DOS, OS/2 and MVS. You can see it here: http://sourceforge.net/projects/pdos/ I now wish to port it to Win32, so that I can create executables to run under Windows 98 command prompt where every byte of the executable is from public domain code. I'm only interested in writing strictly conforming C89 programs,
21
6899
by: one2001boy | last post by:
PostMessage() function returns ERROR_NOT_ENOUGH_QUOTA after running in a loop for 700 times, but the disk space and memory are still big enough. any suggestion to resolve this problem? thanks.
6
8621
by: Rares Vernica | last post by:
Hi, I am using tr1/unordered_map in my code. My code compiled ok on g++ (GCC) 4.1.2 (Ubuntu 4.1.2-0ubuntu1). Now I need to compile my code on g++ (GCC) 4.0.3 (Ubuntu 4.0.3-1ubuntu5). I get a messy error. Here are what I try to do: typedef unordered_map<string, unsignedStringHash;
5
2245
by: lanclot | last post by:
hi i am trying to authenticate a user using ClientLogin by sending a post to https://www.google.com/accounts/ClientLogin in my c program use ssl and socket the next code is my request: sprintf(request, "POST /accounts/ClientLogin HTTP/1.0\r\nContent-type: application/x-www-form-urlencoded\r\nContent-length:1357\r \nEmail=myemail@sina.com&Passwd=mypasswd&service=lh2&source=sd-aa-1.0\r \n");
7
7282
by: neha_chhatre | last post by:
hello im writing a c program in ubuntu, im using the function log2f(float) float stands for a float value.... im getting the following error neha@neha:~/midi$ gcc twinkle_formula.c twinkle_formula.c: In function 'main': twinkle_formula.c:129: warning: incompatible implicit declaration of
2
6365
by: akhilesh.noida | last post by:
I am trying to compile glibc-2.5 for ARM based board. But I am getting errors while configuring it. Please check and give your inputs for resolving this. configure command : $ ../glibc-2.5/configure --prefix=/mnt/new/Mars/glibc_HQ_test/GLIBC/ install/ --with-__thread --enable-kernel=2.6.11 --enable-shared
1
10319
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10076
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9144
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7616
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6851
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5651
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4297
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3816
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2990
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.