import cinit from unix.schottelius.org
Signed-off-by: Nico Schottelius <nico@ikn.schottelius.org>
This commit is contained in:
parent
3729fc68eb
commit
423ba10303
13396 changed files with 269468 additions and 0 deletions
|
|
@ -0,0 +1,24 @@
|
|||
/*
|
||||
* (c) 2005 Nico Schottelius (nico-linux at schottelius.org)
|
||||
* tell cinit that I want to start a service
|
||||
* part of cinit
|
||||
*/
|
||||
|
||||
#include <unistd.h>
|
||||
#include <stdio.h>
|
||||
#include "cinit.h"
|
||||
|
||||
int begin_msg(char cmd)
|
||||
{
|
||||
sock = connect_sock(sock);
|
||||
if( sock == -1 ) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if(write(sock,&cmd,sizeof(cmd)) == -1) {
|
||||
perror(MSG_ERR_IO);
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue