Hi Graff,
On Mon, 2009-08-10 at 13:22 +0800, graff.yang@xxxxxxxxx wrote:
> This patch makes the irattach also run on some architectures, that running uClinux because of without MMU.
>
> Compare to the first version patch, it removed the ugly ifdef.
Thanks, patch applied to the irda-utils git tree.
Cheers,
Samuel.
>
> Index: irda-utils/irattach/util.c
> ===================================================================
> --- irda-utils/irattach/util.c (revision 125)
> +++ irda-utils/irattach/util.c (working copy)
> @@ -156,22 +156,11 @@
>
> void fork_now(int ttyfd)
> {
> - int ret;
> int i;
>
> - if ((ret = fork()) > 0)
> - exit(0);
> -
> - if (ret == -1)
> - syslog(LOG_INFO, "forking: %m");
> - if (setsid() < 0)
> - syslog(LOG_INFO, "detaching from tty: %m");
> + daemon (1, 1);
> + syslog(LOG_INFO, "run in the background ...");
>
> - if ((ret = fork()) > 0) {
> - /* cleanup_files = 0; */
> - exit(0);
> - }
> -
> /* Close all open inherited files! Except for ttyfd! */
> for (i = 0; i < 64; i++)
> if(i != ttyfd)
>
>
> Thanks,
> --
> Graff
> --
> To unsubscribe from this list: send the line "unsubscribe irda-users" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe irda-users" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
[Home]
[Linux SCSI]
[Linux USB Devel]
[Video for Linux]
[Linux Audio Users]
[Photo]
[Yosemite News]
[Yosemite Photos]
[Free Online Dating]
[Linux Kernel]
[Linux SCSI]
[XFree86]