Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
LSH
lsh
Commits
abfc96df
Commit
abfc96df
authored
Oct 28, 1998
by
Niels Möller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changed handling of LSH_CLOSE and LSH_DIE.
Rev: src/io.c:1.19
parent
7acbee3d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
8 deletions
+15
-8
src/io.c
src/io.c
+15
-8
No files found.
src/io.c
View file @
abfc96df
...
...
@@ -260,6 +260,10 @@ static int io_iter(struct io_backend *b)
/* NOTE: These flags are not mutually exclusive. All
* combination must be handled correctly. */
/* NOTE: (i) If LSH_DIE is set, LSH_CLOSE is ignored.
* (ii) If the fd is read_only, LSH_CLOSE is the same as LSH_DIE.
*/
#if 0
if ( (res & (LSH_CLOSE | LSH_DIE)) == (LSH_CLOSE | LSH_DIE) )
{
debug("return code %x, both LSH_CLOSE and LSH_DIE set.\n",
...
...
@@ -270,14 +274,7 @@ static int io_iter(struct io_backend *b)
/* FIXME: Perhaps we should always set LSH_FAIL in
* this case? */
}
if
(
res
&
LSH_CLOSE
)
{
if
(
fd
->
buffer
)
write_buffer_close
(
fd
->
buffer
);
fd
->
close_reason
=
LSH_FAILUREP
(
res
)
?
CLOSE_PROTOCOL_FAILURE
:
CLOSE_EOF
;
}
#endif
if
(
res
&
LSH_DIE
)
{
if
(
fd
->
buffer
)
...
...
@@ -287,6 +284,16 @@ static int io_iter(struct io_backend *b)
?
CLOSE_PROTOCOL_FAILURE
:
0
;
fd
->
close_now
=
1
;
}
else
if
(
res
&
LSH_CLOSE
)
{
if
(
fd
->
buffer
)
write_buffer_close
(
fd
->
buffer
);
else
fd
->
close_now
=
1
;
fd
->
close_reason
=
LSH_FAILUREP
(
res
)
?
CLOSE_PROTOCOL_FAILURE
:
CLOSE_EOF
;
}
if
(
res
&
LSH_KILL_OTHERS
)
{
/* Close all other files. We have probably fork()ed. */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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