From 87d8c59258e9311ca16d0dac72af2a2c1c7a5022 Mon Sep 17 00:00:00 2001 From: albeu Date: Mon, 4 Feb 2002 15:03:18 +0000 Subject: Remove some unuseful stuff and don't try to kill an unexisting child process on uninit git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@4527 b3059339-0415-0410-9bf9-f77b7e298cf2 --- input/lirc.c | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) (limited to 'input/lirc.c') diff --git a/input/lirc.c b/input/lirc.c index 0582ed676a..2f7fc2e016 100644 --- a/input/lirc.c +++ b/input/lirc.c @@ -33,7 +33,6 @@ mp_input_lirc_process(int mp_fd); int mp_input_lirc_init(void) { - int lirc_flags; int lirc_sock; int p[2]; @@ -43,19 +42,6 @@ mp_input_lirc_init(void) { return -1; } -#if 0 - fcntl(lirc_sock,F_SETOWN,getpid()); - lirc_flags=fcntl(lirc_sock,F_GETFL,0); - if(lirc_flags!=-1) { - fcntl(lirc_sock,F_SETFL,lirc_flags|O_NONBLOCK); - } else { - lirc_deinit(); - mp_msg(MSGT_LIRC,MSGL_ERR,MSGTR_LIRCsocketerr MSGTR_LIRCdisabled,strerror(errno)); - return -1; - } -#endif - - if(lirc_readconfig( lirc_configfile,&lirc_config,NULL )!=0 ){ mp_msg(MSGT_LIRC,MSGL_ERR,MSGTR_LIRCcfgerr MSGTR_LIRCdisabled, lirc_configfile == NULL ? "~/.lircrc" : lirc_configfile); @@ -137,6 +123,8 @@ mp_input_lirc_process(int mp_fd) { void mp_input_lirc_uninit(void) { + if(child_pid <= 0) + return; if( kill(child_pid,SIGQUIT) != 0) { mp_msg(MSGT_LIRC,MSGL_V,"LIRC can't kill subprocess %d : %s\n", child_pid,strerror(errno)); -- cgit v1.2.3