diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/xsmfns.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/xsmfns.c b/src/xsmfns.c index 48aaa9bef8a..3b06f7133c7 100644 --- a/src/xsmfns.c +++ b/src/xsmfns.c | |||
| @@ -28,6 +28,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 28 | 28 | ||
| 29 | #include <unistd.h> | 29 | #include <unistd.h> |
| 30 | #include <sys/param.h> | 30 | #include <sys/param.h> |
| 31 | #include <errno.h> | ||
| 31 | #include <stdio.h> | 32 | #include <stdio.h> |
| 32 | 33 | ||
| 33 | #include "lisp.h" | 34 | #include "lisp.h" |
| @@ -402,6 +403,14 @@ x_session_initialize (struct x_display_info *dpyinfo) | |||
| 402 | SmcCallbacks callbacks; | 403 | SmcCallbacks callbacks; |
| 403 | ptrdiff_t name_len = 0; | 404 | ptrdiff_t name_len = 0; |
| 404 | 405 | ||
| 406 | /* libSM seems to crash if pwd is missing - see bug#18851. */ | ||
| 407 | if (! get_current_dir_name ()) | ||
| 408 | { | ||
| 409 | fprintf (stderr, "Disabling session management due to pwd error: %s\n", | ||
| 410 | emacs_strerror (errno)); | ||
| 411 | return; | ||
| 412 | } | ||
| 413 | |||
| 405 | ice_fd = -1; | 414 | ice_fd = -1; |
| 406 | doing_interact = false; | 415 | doing_interact = false; |
| 407 | 416 | ||