Lines Matching refs:tsd
407 struct unsocks *tsd; in syslogd_main() local
419 tsd = xzalloc(sizeof(struct unsocks)); in syslogd_main()
421 tsd->path = (toys.optflags & FLAG_p) ? TT.unix_socket : "/dev/log"; // DEFLOGSOCK in syslogd_main()
422 TT.lsocks = tsd; in syslogd_main()
427 tsd = xzalloc(sizeof(struct unsocks)); in syslogd_main()
428 tsd->path = temp; in syslogd_main()
429 tsd->next = TT.lsocks; in syslogd_main()
430 TT.lsocks = tsd; in syslogd_main()
439 for (tsd = TT.lsocks; tsd; tsd = tsd->next) { in syslogd_main()
440 tsd->sdu.sun_family = AF_UNIX; in syslogd_main()
441 strcpy(tsd->sdu.sun_path, tsd->path); in syslogd_main()
442 tsd->sd = socket(AF_UNIX, SOCK_DGRAM, 0); in syslogd_main()
443 if (tsd->sd < 0) { in syslogd_main()
447 unlink(tsd->sdu.sun_path); in syslogd_main()
448 if (bind(tsd->sd, (struct sockaddr *) &tsd->sdu, sizeof(tsd->sdu))) { in syslogd_main()
449 perror_msg("BIND SOCKS : failed sock : %s", tsd->sdu.sun_path); in syslogd_main()
450 close(tsd->sd); in syslogd_main()
453 chmod(tsd->path, 0777); in syslogd_main()
486 for (tsd = TT.lsocks; tsd; tsd = tsd->next) FD_SET(tsd->sd, &rfds); in syslogd_main()
524 for (tsd = TT.lsocks; tsd; tsd = tsd->next) { in syslogd_main()
525 int sd = tsd->sd; in syslogd_main()