#42: don't read stdin when running in a noninteractive shell ---------------------------------------+--------------------- Reporter: taeuber | Owner: Type: enhancement | Status: open Priority: wish | Component: FFmpeg Version: git | Resolution: Keywords: noninteractive shell stdin | Blocked By: Blocking: | Reproduced: 0 Analyzed: 0 | ---------------------------------------+---------------------
Comment (by taeuber): Hi Michael, this is how I would implement it: {{{ int interactive() { int fd, interactive; fd = open ("/dev/tty", O_RDONLY); if (fd < 0) return fd; interactive = (tcgetpgrp(fd) == getpgid(0)); close (fd); return interactive; } }}} I have no idea about autoconf tools. But this doesn't solve the problem. It only tests foreground or background processing. Maybe an additional command line option would be the solution of choice? Lars -- Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/42#comment:4> FFmpeg <http://ffmpeg.org> FFmpeg issue tracker _______________________________________________ FFmpeg-trac mailing list FFmpeg-trac@avcodec.org http://avcodec.org/mailman/listinfo/ffmpeg-trac