An Algorithm for ftpd Under the Hurd /* Create the socket. */ sock = make_socket (FTPD_PORT) listen (sock, 1) drop_all_permission () /* Become unknown. */ while (fd = listen (sock)) { if (fork () > 0) { /* Child */ accept (fd) prompt (name, password) if (password_check_user (name, password)) /* Become user. */ ftp_session () else /* Reject access. */ close () } }