[Bug 22338] New: spawnl(P_WAIT, "...") and system() do not wait if a host program is invoked
http://bugs.winehq.org/show_bug.cgi?id=22338 Summary: spawnl(P_WAIT, "...") and system() do not wait if a host program is invoked Product: Wine Version: unspecified Platform: x86 OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: msvcrt AssignedTo: wine-bugs(a)winehq.org ReportedBy: bonzini(a)gnu.org Sample program: #include <stdio.h> #include <stdlib.h> int main(int argc, char **argv) { int i; if (argc == 2) system (argv[1]); for (i = 0; i < 10000; i++) puts (argc == 2 ? "a" : "b"); } Compile it for both Windows and Linux: gcc test.c i686-pc-mingw32-gcc test.c Now, running a Windows child process will correctly wait for the child process to finish: $ ./a.exe ./a.exe |uniq b a Instead, Wine will not wait for a Linux child process to finish: $ ./a.exe ./a.out |uniq a b a I _think_ i can work around the bug by wrapping the Unix program with a wrapper that links to libwine, but I am not yet sure. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=22338 --- Comment #1 from Paolo Bonzini <bonzini(a)gnu.org> 2010-04-11 08:43:33 --- It doesn't work: $ winegcc f.c -m32 -mconsole -o a.exe.so $ ./a.exe ./a.exe.so b a b a -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=22338 Austin English <austinenglish(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download, source, testcase -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=22338 --- Comment #2 from Vitaliy Margolen <vitaliy(a)kievinfo.com> 2010-04-11 12:13:26 --- Have you verified this on real Windows? Things work differently there -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=22338 Paolo Bonzini <bonzini(a)gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|spawnl(P_WAIT, "...") and |spawnl(P_WAIT, "...") and |system() do not wait if a |system() do not wait if a |host program is invoked |Unix program is invoked --- Comment #3 from Paolo Bonzini <bonzini(a)gnu.org> 2010-04-11 13:42:32 --- How can I verify this bug on real Windows if it requires me to launch a Unix executable? :-) The point is that system() and spawnl(P_WAIT, "...") should work independent of what executable I give, for example this waits: system ("c:\\msys\\1.0\\bin\\cat.exe z:\\etc\\passwd"); and this doesn't: system ("z:\\bin\\cat.exe z:\\etc\\passwd"); BTW I think the affected component is actually wineserver but I'm not sure. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=22338 --- Comment #4 from Paolo Bonzini <bonzini(a)gnu.org> 2010-04-11 13:45:08 --- Sorry, should have been system ("z:\\bin\\cat /etc/passwd"); -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=22338 Vitaliy Margolen <vitaliy(a)kievinfo.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |FIXED --- Comment #5 from Vitaliy Margolen <vitaliy(a)kievinfo.com> 2010-04-11 16:39:57 --- Then it's invalid. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=22338 Vitaliy Margolen <vitaliy(a)kievinfo.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED --- Comment #6 from Vitaliy Margolen <vitaliy(a)kievinfo.com> 2010-04-11 16:40:17 --- Closing. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=22338 --- Comment #7 from Paolo Bonzini <bonzini(a)gnu.org> 2010-04-11 16:44:05 --- Exactly why? If it is not supported to call Unix programs from Windows, the bug is that you can spawn a Unix program in the first place. Otherwise it is supported, and spawnl(P_WAIT, "...") not waiting is a bug. In either case, there is a bug. Also, closing as "FIXED" is wrong. It could be "INVALID" or "WONTFIX", but it is not fixed. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=22338 Vitaliy Margolen <vitaliy(a)kievinfo.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|FIXED |WONTFIX --- Comment #8 from Vitaliy Margolen <vitaliy(a)kievinfo.com> 2010-04-11 17:02:56 --- Yeah it's not fixes, it's a WONTFIX. See bug 18335 for details. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=22338 Paolo Bonzini <bonzini(a)gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|CLOSED |RESOLVED Resolution|WONTFIX |DUPLICATE --- Comment #9 from Paolo Bonzini <bonzini(a)gnu.org> 2010-04-11 17:13:20 --- Thanks, this makes more sense. *** This bug has been marked as a duplicate of bug 18335 *** -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=22338 Jeff Zaroyko <jeffz(a)jeffz.name> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED --- Comment #10 from Jeff Zaroyko <jeffz(a)jeffz.name> 2010-04-11 18:53:32 --- Closing duplicate. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
participants (1)
-
wine-bugs@winehq.org