[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-gnulib] system module?
From: |
Eric Blake |
Subject: |
Re: [bug-gnulib] system module? |
Date: |
Fri, 23 Jun 2006 06:40:08 -0600 |
User-agent: |
Thunderbird 1.5.0.4 (Windows/20060516) |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
According to Andreas Büning on 6/22/2006 1:29 PM:
>
> However, I thought that this behaviour of system() was common on DOS/Win*/OS/2
> systems.
> system("xcopy non_existing_file") returns 1 for example.
That's not a problem, unless:
FILE*f;
int result;
int ch;
f = popen("xcopy non_existing_file", "r");
while ((ch = getc(f)) != EOF);
result = pclose(f);
returns 256, and if WEXITSTATUS is defined as (status>>8)&0xff. Can
someone with mingw access confirm if this system() bug is widespread?
I've already checked that cygwin is not affected.
>
> Possibly, djgpp for DOS or the MinGW environment for Win* might have
> the same behaviour which I cannot test because I don't use them.
If they do, then I will try to write a module that does an AC_RUN_IFELSE
using something similar to the above; compare the results of popen and
system on the same command known to fail without producing output, and see
if the return values are the same.
- --
Life is short - so eat dessert first!
Eric Blake address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.1 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFEm+Eo84KuGfSFAYARAhhqAJ0Sy8AGeGhQGTdJ9ek5Xn8/V7CsGQCdGSP1
ulSMc2Efc8vdQqkZpYme4FU=
=Fl5W
-----END PGP SIGNATURE-----