summaryrefslogtreecommitdiffstats
path: root/usr.sbin/jail
diff options
context:
space:
mode:
authormike <mike@FreeBSD.org>2003-04-21 17:20:48 +0000
committermike <mike@FreeBSD.org>2003-04-21 17:20:48 +0000
commit82a28ce246cd7ac3542c081b0939802c8465fa4e (patch)
treee9f96e4cec050cd3f5fef89e9660c963829ebbe8 /usr.sbin/jail
parent9f7fbe4b69e021db42a1428ad54099d4ce0b6f9c (diff)
downloadFreeBSD-src-82a28ce246cd7ac3542c081b0939802c8465fa4e.zip
FreeBSD-src-82a28ce246cd7ac3542c081b0939802c8465fa4e.tar.gz
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.
Diffstat (limited to 'usr.sbin/jail')
-rw-r--r--usr.sbin/jail/jail.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.sbin/jail/jail.c b/usr.sbin/jail/jail.c
index 87bc483..62db696 100644
--- a/usr.sbin/jail/jail.c
+++ b/usr.sbin/jail/jail.c
@@ -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");
OpenPOWER on IntegriCloud