X-Git-Url: https://git.hcoop.net/bpt/emacs.git/blobdiff_plain/d804ada24efd28b8574e2d9e5d87c364e4223e84..ed4c17bb826f4903fc1ca0a815f5074bf0702f2a:/src/xsmfns.c diff --git a/src/xsmfns.c b/src/xsmfns.c index 5a3fdbb881..bfc8a2dfae 100644 --- a/src/xsmfns.c +++ b/src/xsmfns.c @@ -1,12 +1,13 @@ /* Session management module for systems which understand the X Session management protocol. - Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc. + Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008 + Free Software Foundation, Inc. This file is part of GNU Emacs. GNU Emacs is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2, or (at your option) +the Free Software Foundation; either version 3, or (at your option) any later version. GNU Emacs is distributed in the hope that it will be useful, @@ -48,6 +49,7 @@ Boston, MA 02110-1301, USA. */ #include "lisp.h" #include "systime.h" #include "sysselect.h" +#include "frame.h" #include "termhooks.h" #include "termopts.h" #include "xterm.h" @@ -387,16 +389,9 @@ ice_conn_watch_CB (iceConn, clientData, opening, watchData) } ice_fd = IceConnectionNumber (iceConn); -#ifndef F_SETOWN_BUG #ifdef F_SETOWN -#ifdef F_SETOWN_SOCK_NEG - /* stdin is a socket here */ - fcntl (ice_fd, F_SETOWN, -getpid ()); -#else /* ! defined (F_SETOWN_SOCK_NEG) */ fcntl (ice_fd, F_SETOWN, getpid ()); -#endif /* ! defined (F_SETOWN_SOCK_NEG) */ #endif /* ! defined (F_SETOWN) */ -#endif /* F_SETOWN_BUG */ #ifdef SIGIO if (interrupt_input) @@ -510,6 +505,14 @@ x_session_initialize (dpyinfo) } } +/* Ensure that the session manager is not contacted again. */ + +void +x_session_close () +{ + ice_fd = -1; +} + DEFUN ("handle-save-session", Fhandle_save_session, Shandle_save_session, 1, 1, "e",