[syslinux] SOLVED: failed to create ldlinux.sys

maf at appgate.com maf at appgate.com
Thu Dec 13 02:01:10 PST 2007


I have been having problems with syslinux not working on one system. The
error message was "failed to create ldlinux.sys". I checked and mcopy
was installed. But upon further investigation I finally found the
problem. I were starting syslinux for python (2.4) and in the python
code I made it ignore SIGNCHLD. It turns out that this signal state was
inherited by syslinux and it made waitpid() in syslinux.c fail which
caused the error message. That is syslinux thought mcopy had failed when
it had not.

The solution is to reset the SIGNCHLD handler to the default behavior
when starting syslinux. This patch does that:

--- unix/syslinux.c.orig        2007-12-13 10:41:18.000000000 +0100
+++ unix/syslinux.c     2007-12-13 10:40:52.000000000 +0100
@@ -45,6 +45,7 @@
 #include <sys/types.h>
 #include <sys/wait.h>
 #include <sys/mount.h>
+#include <signal.h>
 
 #include <sys/ioctl.h>
 #include <linux/fs.h>          /* FIGETBSZ, FIBMAP */
@@ -372,6 +373,11 @@
     usage();
 
   /*
+   * Fix sigchld handling
+   */
+  signal(SIGCHLD, SIG_DFL);
+  
+  /*
    * First make sure we can open the device at all, and that we have
    * read/write permission.
    */

	/MaF
-- 
Martin Forssen <maf at appgate.com>              Development Manager
Phone: +46 31 7744361                         AppGate Network Security AB




More information about the Syslinux mailing list