|
by: George Marshall |
last post by:
Hi all, I'm trying to get the exit code of a program
I want to exec in a python script in a portable manner.
I've read that both os.system and os.spawnl are not a
portable solution.
I tried the os.popen() function and I got the program's exit
code with the close() method.
p=os.popen("return_a_exit_code.sh")
|
by: fwee |
last post by:
What is the difference between using exit(n) and return n in main(), if
any? I know that exit(n) is a function that exits and return n exits via a
return value, but is there any reason to specify one rather than the
other? Thanks!
|
by: Stephen Mayes |
last post by:
I notice in my stdlib.h:
#define EXIT_FAILURE 1 /* Failing exit status. */
#define EXIT_SUCCESS 0 /* Successful exit status. */
Are these definitions dictated by the standard? I've seen them used often
in
this group so I assume they are.
If so, are there any other standard defined return values that I could use
|
by: Fao, Sean |
last post by:
As far as I can tell, the standard has defined three portable return
codes from function main() (0, EXIT_SUCCESS, EXIT_FAILURE). Personally,
on all platforms I have worked with, EXIT_SUCCESS is, "#define
EXIT_SUCCESS 0" and EXIT_FAILURE is, "#define EXIT_FAILURE 1". I have,
however, been told that a few platforms define the two in reverse...
|
by: Lyle Fetterly |
last post by:
Hello,
In the case of returning an integer from a function to notify success or
error which does 0 customarily signify? For example:
int chk( int c ) {
...
}
int fn( int c ) {
|
|
by: John Williams |
last post by:
VB .Net 2003, .Net Framework 1.1, Windows XP Pro SP1
I've written a console application which I run as a scheduled task. How do
I return an exit status value (or string) from the application so that the
status is displayed in the Status column of the Scheduled Tasks window?
I've tried the following methods, and the console app definitely...
|
by: bobrics |
last post by:
Hi,
I am trying to link use a library created by me, and getting the
following error during linking:
$: sudo gcc -c mycode.c
$: sudo ar rc libmylib.a myfuncs.o
$: sudo runlib libmylib.a
$: gcc myfuncs.o -o mycode -L. -lmylib -lm
/usr/lib/gcc/i486-linux-gnu/4.0.2/../../../../lib/crt1.o: In function
|
by: Odd Bjørn Andersen |
last post by:
Is there a way to check the return status from a stored procedure when
called from a OS (Windows) script?
I have a stored procedure that does some checking in the database, and the
return status is set to 0 or -1 if 'OK' or 'not OK' respectively.
When I call the from CLP I get something like this:
Value of output parameters...
|
by: Navaneet |
last post by:
Hi,
I am building a application on linux. I am getting an error which
relates to undefined reference to a function. I had build same on
other platform, no error comes.
Here is whole error message ...
make: Warning: File `linux_i32' has modification time 9.5e+02 s in the
future
gcc -Dlinux_i32 -fPIC -I/usr/local/actel/actel-dinkum/include...
|
by: Bill Cunningham |
last post by:
I have heard that return -1 is not portable. So what would be the answer
to portability in this case? What about exit(0) and exit (-1) or exit (1)?
Or would it be best to stick with C's macros, hence:
exit(EXIT_FAILURE)
exit (EXIT_SUCCESS)
Bill
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
|
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it. ...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
|
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...
|
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...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
|
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
|
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...
|