[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
sdiff "subsidiary program `%s' failed" [diffutils 2.8.4-r1]
From: |
D. Wollmann |
Subject: |
sdiff "subsidiary program `%s' failed" [diffutils 2.8.4-r1] |
Date: |
Sat, 11 Jan 2003 01:28:57 -0600 |
User-agent: |
KMail/1.4.3 |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
distribution: diffutils 2.8.4-r1
platform: Gentoo GNU/Linux 1.4_rc1
bug description:
sdiff always prints an error message: "subsidiary program `?' failed"
(where ? is the editor pathname set in the EDITOR shell variable) and returns
non-zero exit status.
At sdiff.c:704 there is a call to waitpid after calling pclose on a diff
process forked with popen, which probably returns ECHILD. As I read the
documentation, pclose waits for the child and a wait4 call on the child pid
after a pclose will return an error indicator.
The following patch "works here", but as I am not a real C hacker, it should
be examined more carefully before use.
- --- sdiff.c.orig 2002-06-17 00:55:42.000000000 -0500
+++ sdiff.c 2003-01-08 03:04:02.000000000 -0600
@@ -692,7 +692,7 @@
ck_fclose (out);
{
- - int wstatus;
+ int wstatus = 0;
int werrno = 0;
#if ! (HAVE_WORKING_FORK || HAVE_WORKING_VFORK)
@@ -701,11 +701,6 @@
werrno = errno;
#else
ck_fclose (diffout);
- - while (waitpid (diffpid, &wstatus, 0) < 0)
- - if (errno == EINTR)
- - checksigs ();
- - else
- - perror_fatal ("waitpid");
diffpid = 0;
#endif
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
iD8DBQE+H8fIm+D7kzTIiiERAlBMAKDZ06YjQuF+iWKUlgjbXo4k5iyPWgCguVoV
Lsi4mexIs2etcKT+pRKnjl4=
=ZGnv
-----END PGP SIGNATURE-----
- sdiff "subsidiary program `%s' failed" [diffutils 2.8.4-r1],
D. Wollmann <=