As promised. the problem was that tftpd would core dump if given no arguments. I fixed it to use getopt. I also changed 0 to fd, because I had added some debugging code that allowed me to start it from the command line.