void sigchld_handler(int s) {
int* status=NULL;
int* i;
- char buf[80];
pid_t pid;
while((pid=wait(status)) > 0) {
* is severely wrong).
**/
void sigterm_handler(int s) {
- int i;
int parent=0;
g_hash_table_foreach(children, killchild, &parent);
writeit(client->net, buf, len + sizeof(struct nbd_reply));
DEBUG("OK!\n");
}
+ return 0;
}
/**
* @param net A network socket connected to an nbd client
**/
void serveconnection(CLIENT *client) {
- char buf[80];
splitexport(client);
if (!client->server->expected_size) {
struct sockaddr_in addrin;
struct sigaction sa;
int addrinlen = sizeof(addrin);
- int newpid, i;
#ifndef sun
int yes=1;
#else
**/
int serveloop(SERVER* serve) {
struct sockaddr_in addrin;
- int addrinlen=sizeof(addrin);
+ socklen_t addrinlen=sizeof(addrin);
for(;;) {
CLIENT *client;
int net;