Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
LSH
lsh
Commits
c1663f17
Commit
c1663f17
authored
Sep 02, 2011
by
Niels Möller
Browse files
(main): Fixed --stop-gateway. Must read the hello
message before we write the stop message. Rev: src/lsh.c:1.231
parent
960f5202
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/lsh.c
View file @
c1663f17
...
...
@@ -557,6 +557,8 @@ main_options[] =
{
NULL
,
0
,
NULL
,
0
,
"Miscellaneous options:"
,
0
},
{
"escape-char"
,
'e'
,
"Character"
,
0
,
"Escape char. `none' means disable. "
"Default is to use `~' if we have a tty, otherwise none."
,
0
},
/* FIXME: Add --pid-file option which writes the pid to a specified
file, and deletes that file when exiting. */
{
"write-pid"
,
OPT_WRITE_PID
,
NULL
,
0
,
"Make -B write the pid of the backgrounded "
"process to stdout."
,
0
},
...
...
@@ -1196,9 +1198,14 @@ main(int argc, char **argv)
}
else
{
if
(
!
write_raw
(
fd
,
sizeof
(
stop_message
),
stop
_message
))
if
(
!
process_hello
_message
(
fd
))
{
werror
(
"Failed to send stop message to gateway.
\n
"
);
if
(
!
options
->
start_gateway
)
return
EXIT_FAILURE
;
}
else
if
(
!
write_raw
(
fd
,
sizeof
(
stop_message
),
stop_message
))
{
werror
(
"Failed to send stop message to gateway: %e.
\n
"
,
errno
);
if
(
!
options
->
start_gateway
)
return
EXIT_FAILURE
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment