ltib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Ltib] question about gpsd-2.37-for-uclinux patch


From: Andrea Galbusera
Subject: [Ltib] question about gpsd-2.37-for-uclinux patch
Date: Thu, 04 Mar 2010 14:58:07 +0100

Hi Ltib folks,
After upgrading my ltib environment from a previous Freescale BSP up to
the latest Savannah CVS version, I noticed that one of the packages used
by my configuration was not behaving as before.

The package is gpsd: after some investigation I found out that a new
patch was applied to the default spec file for this package (against the
same version of upstream sources, gpsd-2.37). The patch is very simple
and seems to target those architectures that don't implement the fork()
system call. Here is the patch's content:

gpsd-2.37-for-uclinux.patch
--- gpsd-2.37.org/gpsd.c        2008-11-20 09:17:01.000000000 +0800
+++ gpsd-2.37/gpsd.c    2008-11-20 09:18:15.000000000 +0800
@@ -126,8 +126,11 @@
 {
     int fd;
     pid_t pid;
-
+#if defined(HAVE_FORK)
     switch (pid = fork()) {
+#else
+    switch (pid = vfork()) {
+#endif
     case -1:
        return -1;
     case 0:    /* child side */

My question is: who's responsible for providing HAVE_FORK symbol at
compile time? I can't see any change in configure script. Is it supposed
to be provided by the ltib configuration environment? If so, how?

The point is that on my architecture - that HAS fork() - this code get
compiled in with the #else clause enabled (calling vfork() instead of
fork()). This results in gpsd not demonizing anymore by default (as
stated in the manpage for version 2.37) since vfork will block parent
process.

Am I missing something or is this a sort of a bug?

TIA
Regards
Andrea





reply via email to

[Prev in Thread] Current Thread [Next in Thread]