summaryrefslogtreecommitdiff
path: root/sys/src/ape/lib/net/hangup.c
blob: 920ac1cdd9a891855f7e1fb71a4e5b7d6d4fbfdc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include <stdlib.h>
#include <sys/types.h>
#include <string.h>
#include <fcntl.h>
#include <stdio.h>
#include <unistd.h>
#include <libnet.h>

/*
 *  force a connection to hangup
 */
int
hangup(int ctl)
{
	return write(ctl, "hangup", sizeof("hangup")-1) != sizeof("hangup")-1;
}