Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: missing braces or wrong indent?
- X-seq: zsh-workers 44287
- From: Peter Stephenson <p.stephenson@xxxxxxxxxxx>
- To: <zsh-workers@xxxxxxx>
- Subject: Re: missing braces or wrong indent?
- Date: Mon, 13 May 2019 09:47:06 +0100
- Cms-type: 201P
- Dkim-filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20190513084708euoutp016d19bfb049551d771f5aec10b93094d3~eMcGrNHH70822508225euoutp01i
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1557737229; bh=R/FeJRcX9BuD9b2qDuK43ISDRl6z+Fv8Kgs7dqESRsw=; h=Subject:From:To:Date:In-Reply-To:References:From; b=ul491nynnfhMvis9ZNKzwHYblCbrzf4IsdLHBIHxJH6KqdvH7r7tjumBsuufwz1z/ prcVNPdXG9OYBRIZstsglpEUpSYXX2py3UmbCyg2n9pvSVDrS3VwyEAUcOVkABSzzz IQ+yDBWS8eannGlGiBZKmmWBHESg/H8TZav+2u0M=
- In-reply-to: <CAHYJk3S1BTGRZTmeQha71mXu4k1+yqxtmMwWOTWJB4RAHa+AcA@mail.gmail.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-unsubscribe: <mailto:zsh-workers-unsubscribe@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <CGME20190511180553epcas2p2115461224eb064782dcff498f1b57b74@epcas2p2.samsung.com> <CAHYJk3S1BTGRZTmeQha71mXu4k1+yqxtmMwWOTWJB4RAHa+AcA@mail.gmail.com>
On Sat, 2019-05-11 at 20:04 +0200, Mikael Magnusson wrote:
> 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.
I'd guess just the indentation; I can't see why the setpgrp() would be
particularly useful on failure. Alternatively, possibly there could
even be an "else" before the setpgrp()? Presumably this is rarely
compiled and even then the ioctl() doesn't usually fail so very hard to
see the effect of.
pws
Messages sorted by:
Reverse Date,
Date,
Thread,
Author