Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

/dev/desu

Name: Anonymous 2008-05-08 18:41

i would like to have /dev/desu on leenux, an "infinite" file that only outputs DESUDESUDESUDESUDESU etc. pp.

is it possible to create that via mkfifo ?

Name: Anonymous 2008-05-10 15:26

#include <string.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <unistd.h>

int main(){
 int s_local, s_remote, len;
 struct sockaddr local, remote;
 s_local = socket(PF_LOCAL, SOCK_STREAM, 0);
 local.sa_family = AF_UNIX;
 strcpy(local.sa_data, "/dev/desu");
 unlink(local.sa_data);
 len = sizeof(local);
 bind(s_local, &local, len);
 listen(s_local, 5);
 for(;;){
  s_remote = accept(s_local, &remote, &len);
  if(!fork()) for(;;) send(s_remote, "DESU", 4, 0);
 }
 return 0;
}

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List