The tcgetpgrp() should fail with -1 and should set errno when the file descriptor is a pipe descriptor. It returns 0. Note that file descriptors created with socket pair do return -1. The program below outputs s=0 and errno=0, but it should output s=-1 and errno non-zero. How-To-Repeat: #include <unistd.h> #include <stdio.h> #include <errno.h> int main(int argc, char *argv[]) { int s,pv[2]; pipe(pv); errno = 0; s = tcgetpgrp(pv[1]); fprintf(stderr,"s=%d errno=%d\n",s,errno); return(0); }
For bugs matching the following criteria: Status: In Progress Changed: (is less than) 2014-06-01 Reset to default assignee and clear in-progress tags. Mail being skipped