Skip to content
GitLab
Menu
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
865d9b90
Commit
865d9b90
authored
Nov 03, 1999
by
Niels Möller
Browse files
Minor fixes.
Rev: src/blocking_write.c:1.15 Rev: src/daemon.c:1.3
parent
6be28df2
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/blocking_write.c
View file @
865d9b90
...
...
@@ -34,7 +34,7 @@
(fd . int)
(e object exception_handler)
(write . (pointer (function void
int UINT32 "UINT8 *" "struct exception_handler *e")))))
int UINT32 "
const
UINT8 *" "struct exception_handler *e")))))
*/
#include
"blocking_write.c.x"
...
...
src/daemon.c
View file @
865d9b90
...
...
@@ -29,6 +29,7 @@
#include
"format.h"
#include
"werror.h"
#include
"xalloc.h"
#include
<stdlib.h>
#include
<stdio.h>
...
...
@@ -199,15 +200,17 @@ int daemon_pidfile(const char *name)
}
else
{
struct
lsh_string
*
pid
=
ssh_format
(
"%
l
di"
,
getpid
());
struct
lsh_string
*
pid
=
ssh_format
(
"%di"
,
getpid
());
int
res
=
write
(
fd
,
pid
->
data
,
pid
->
length
);
close
(
fd
);
if
(
(
res
>
0
)
&&
((
unsigned
)
res
==
pid
->
length
)
)
/* Success! */
return
1
;
{
/* Success! */
lsh_string_free
(
pid
);
return
1
;
}
werror
(
"Writing pid file '%z' failed (errno = %i): %z"
,
name
,
errno
,
STRERROR
(
errno
));
...
...
@@ -215,10 +218,13 @@ int daemon_pidfile(const char *name)
if
(
unlink
(
name
)
<
0
)
werror
(
"Unlinking pid file '%z' failed (errno = %i): %z"
,
name
,
errno
,
STRERROR
(
errno
));
lsh_string_free
(
pid
);
return
0
;
}
}
/*
** int daemon_started_by_init(void)
**
...
...
Write
Preview
Supports
Markdown
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