Browse Source

Flush stdout after printing name of created device, so it can be properly

read when 'ggatec create' is used in backticks or its output is piped to
another command.

Submitted by:	Paul Schenkeveld
MFC after:	3 days
tags/ggatessh-v1.0.0
pjd 19 years ago
parent
commit
954d6c9c0c
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      ggatec/ggatec.c

+ 3
- 1
ggatec/ggatec.c View File

@@ -457,8 +457,10 @@ g_gatec_create(void)
snprintf(ggioc.gctl_info, sizeof(ggioc.gctl_info), "%s:%u %s", host,
port, path);
g_gate_ioctl(G_GATE_CMD_CREATE, &ggioc);
if (unit == -1)
if (unit == -1) {
printf("%s%u\n", G_GATE_PROVIDER_NAME, ggioc.gctl_unit);
fflush(stdout);
}
unit = ggioc.gctl_unit;

mydaemon();


Loading…
Cancel
Save