Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

missing braces or wrong indent?



Just submitted a new coverity build and looked at some stuff it was
unhappy about; this isn't one of them but what is going on here?

clone.c::bin_clone
55
    if (!pid) {
	clearjobtab(0);
	ppid = getppid();
	mypid = getpid();
#ifdef HAVE_SETSID
	if (setsid() != mypid)
	    zwarnnam(nam, "failed to create new session: %e", errno);
#elif defined(TIOCNOTTY)
	    if (ioctl(SHTTY, TIOCNOTTY, 0))
	    zwarnnam(*args, "%e", errno);
	    setpgrp(0L, mypid);
#endif
	dup2(ttyfd,0);


This/these if statements look completely bogusly indented, but maybe
it's also missing braces? I can't tell because I have no idea what it
wants to accomplish.

-- 
Mikael Magnusson



Messages sorted by: Reverse Date, Date, Thread, Author