Ticket #38588: osdep-darwin.c.diff
File osdep-darwin.c.diff, 736 bytes (added by jmroot (Joshua Root), 12 years ago) |
---|
-
osdep-darwin.c
old new struct event_base *osdep_event_init(void 33 33 char * 34 34 osdep_get_name(int fd, unused char *tty) 35 35 { 36 struct proc_bsd shortinfo bsdinfo;36 struct proc_bsdinfo bsdinfo; 37 37 pid_t pgrp; 38 38 int ret; 39 39 40 40 if ((pgrp = tcgetpgrp(fd)) == -1) 41 41 return (NULL); 42 42 43 ret = proc_pidinfo(pgrp, PROC_PIDT _SHORTBSDINFO, 0,43 ret = proc_pidinfo(pgrp, PROC_PIDTBSDINFO, 0, 44 44 &bsdinfo, sizeof bsdinfo); 45 if (ret == sizeof bsdinfo && *bsdinfo.pb si_comm != '\0')46 return (strdup(bsdinfo.pb si_comm));45 if (ret == sizeof bsdinfo && *bsdinfo.pbi_comm != '\0') 46 return (strdup(bsdinfo.pbi_comm)); 47 47 return (NULL); 48 48 } 49 49