[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 6/8] killall5.c: Use sysconf(_SC_SYMLOOP_MAX) instead of MAXS
From: |
Pino Toscano |
Subject: |
Re: [PATCH 6/8] killall5.c: Use sysconf(_SC_SYMLOOP_MAX) instead of MAXSYMLINKS. |
Date: |
Mon, 22 Jul 2013 16:10:08 +0200 |
User-agent: |
KMail/1.13.7 (Linux/3.2.0-4-amd64; KDE/4.8.4; x86_64; ; ) |
Alle martedì 9 luglio 2013, Justus Winter ha scritto:
> index 5937d98..02ac88f 100644
> --- a/src/killall5.c
> +++ b/src/killall5.c
> @@ -373,7 +373,7 @@ int check4nfs(const char * path, char * real)
> {
> char buf[PATH_MAX+1];
> const char *curr;
> - int deep = MAXSYMLINKS;
> + int deep = sysconf(_SC_SYMLOOP_MAX);
While certainly better, I just verified that such sysconf returns -1 on
Linux and kFreeBSD; thus, maybe it would make more sense to move this
code in a small function, which would first use sysconf falling back (if
returning <= 0) to MAXSYMLINKS if defined.
--
Pino Toscano
signature.asc
Description: This is a digitally signed message part.
- [PATCH 2/8] initscripts: add -ocompatible to procfs mounts on Hurd, (continued)
- [PATCH 2/8] initscripts: add -ocompatible to procfs mounts on Hurd, Justus Winter, 2013/07/09
- [PATCH 1/8] initscripts: hurd has a proper tmpfs now, remove workaround, Justus Winter, 2013/07/09
- [PATCH 3/8] initscripts: use pidof -s /sbin/init for robustness, Justus Winter, 2013/07/09
- [PATCH 7/8] sendsigs, killprocs: Disable on Hurd. killall5 kills essential processes., Justus Winter, 2013/07/09
- [PATCH 4/8] initscripts: add runsystem.sysv, Justus Winter, 2013/07/09
- [PATCH 5/8] initscripts: Disable rootcheck on Hurd, Justus Winter, 2013/07/09
- [PATCH 6/8] killall5.c: Use sysconf(_SC_SYMLOOP_MAX) instead of MAXSYMLINKS., Justus Winter, 2013/07/09
- Re: [PATCH 6/8] killall5.c: Use sysconf(_SC_SYMLOOP_MAX) instead of MAXSYMLINKS.,
Pino Toscano <=
- [PATCH 8/8] sysvinit: Fix getty path in /etc/inittab on Hurd., Justus Winter, 2013/07/09
- Re: [PATCH 8/8] sysvinit: Fix getty path in /etc/inittab on Hurd., Pino Toscano, 2013/07/22
Re: patches for sysvinit, debian repository for testing, Samuel Thibault, 2013/07/15