Force output of jail ID (if necessary) before excuting the command,

otherwise redirection of stdout to a file using block buffering will
not complete in time.
This commit is contained in:
Mike Barcroft 2003-04-21 17:20:48 +00:00
parent 092cd06fcd
commit 25639ca722
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=113804

View File

@ -80,8 +80,10 @@ main(int argc, char **argv)
i = jail(&j);
if (i == -1)
err(1, "jail");
if (iflag)
if (iflag) {
printf("%d\n", i);
fflush(stdout);
}
if (username != NULL) {
if (setgroups(ngroups, groups) != 0)
err(1, "setgroups");