view lib/net.c @ 1327:85f297591693 draft

Introduce xfork() and make commands use it, and make some WEXITSTATUS() use WIFEXITED() and WTERMSIG()+127.
author Rob Landley <>
date Sat, 31 May 2014 12:33:24 -0500
parents e11684e3bbc5
line wrap: on
line source

#include "toys.h"

int xsocket(int domain, int type, int protocol)
  int fd = socket(domain, type, protocol);

  if (fd < 0) perror_exit("socket %x %x", type, protocol);
  return fd;