From unknown Mon Aug 18 11:17:36 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#32794 <32794@debbugs.gnu.org> To: bug#32794 <32794@debbugs.gnu.org> Subject: Status: 27.0.50; emacsclient crashes on subsequent invocation when it cannot open a tty file Reply-To: bug#32794 <32794@debbugs.gnu.org> Date: Mon, 18 Aug 2025 18:17:36 +0000 retitle 32794 27.0.50; emacsclient crashes on subsequent invocation when it= cannot open a tty file reassign 32794 emacs submitter 32794 John Shahid severity 32794 normal tag 32794 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 21 11:03:31 2018 Received: (at submit) by debbugs.gnu.org; 21 Sep 2018 15:03:31 +0000 Received: from localhost ([127.0.0.1]:48333 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g3Mxt-0002cs-09 for submit@debbugs.gnu.org; Fri, 21 Sep 2018 11:03:31 -0400 Received: from eggs.gnu.org ([208.118.235.92]:54361) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g3Mxr-0002ce-D9 for submit@debbugs.gnu.org; Fri, 21 Sep 2018 11:03:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g3Mxj-0004Ck-HV for submit@debbugs.gnu.org; Fri, 21 Sep 2018 11:03:22 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:57152) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1g3Mxj-0004Cg-DT for submit@debbugs.gnu.org; Fri, 21 Sep 2018 11:03:19 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47092) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g3Mxh-0002Qw-Fu for bug-gnu-emacs@gnu.org; Fri, 21 Sep 2018 11:03:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g3Mxc-00049j-GO for bug-gnu-emacs@gnu.org; Fri, 21 Sep 2018 11:03:17 -0400 Received: from mail-qt1-x831.google.com ([2607:f8b0:4864:20::831]:34241) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1g3Mxc-00049Y-9C for bug-gnu-emacs@gnu.org; Fri, 21 Sep 2018 11:03:12 -0400 Received: by mail-qt1-x831.google.com with SMTP id x23-v6so1996722qtr.1 for ; Fri, 21 Sep 2018 08:03:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version; bh=1wt79R+Qc4ZvTI6I7Mdn3KWcpOSnhSrfKgEvxrdc8nU=; b=QshVTr7ch3RwFGcTTRXcSjFZQV5WK1L5PQDEEhbeLVgm4sceuXKBbAktwMoGN3jOxl rKDHSpnril2/4XHu8F7oSzFh+pc2pbwXUDTpp/33o55CmG9ICuWf5T62NQb8Bzu/x7VI EcXpk4DwL97b17iOjitalkExNFN897GKc8YGOWdP2Uw72FtE1egdgmSNq6b7KUwnFQ84 UwHh+BIDi0e80BhbHKjRUek85schiyQdWPU2DfyIfKpY097t7QXfJaVKB0C8mkE2RACu NrOapv5QQHMYyFYh0rGVbfQt0TwXabyqihNudtboyk4R/Q0Hb4BlCiETzDaeRa1sBZuS IHSQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version; bh=1wt79R+Qc4ZvTI6I7Mdn3KWcpOSnhSrfKgEvxrdc8nU=; b=UvJ70mf4LYeQS6IRNeRtuoYnpVv7EHQTgUWlnSFmp8a31eSU0vUP0ocblLLhBHwnii yC4uGoBdb1Kou/Kgmo4rdRKnhxOYwrzQRRKDlhgzKlbJkvnJjM10m0ERSDakK44lZ628 LPEpZxaLg97T5rym/U9uqYgZMJsWhPHLPeGyROpCbTA+yVgcZ2mEYGc8WmDUnfvk2HHZ QP5Uwc1pSjMYgo3M0Ehs7KDYvEu5exizXi8noAqOJYBAHoEjLCff8FaNEvTOsW+Bikix gw6m+7mivK2U+HkJfBMToN5OlWwtgFlqAQkzQstZ8BgWpiP62NYtAVHtFjXPxcRjjrWR Kj3A== X-Gm-Message-State: APzg51BSwlVz8byrYF9KG62ySxgH/tCyiLy4C7oa7u/OLMnOpgapLLTG FgtU/AbfsR2nzx54Gk0Q1xBCeEd0 X-Google-Smtp-Source: ANB0VdacxDGE5ej3XNo7wx0BpNYr9xZfFjB6VMH6mgQSpplg53h0EbkRZWkH/HiLbXuDxHW9z9F17A== X-Received: by 2002:ac8:259d:: with SMTP id e29-v6mr32714110qte.233.1537542191235; Fri, 21 Sep 2018 08:03:11 -0700 (PDT) Received: from amun ([142.154.219.2]) by smtp.gmail.com with ESMTPSA id 15-v6sm19702021qtx.44.2018.09.21.08.03.10 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 21 Sep 2018 08:03:10 -0700 (PDT) From: John Shahid To: bug-gnu-emacs@gnu.org Subject: 27.0.50; emacsclient crashes on subsequent invocation when it cannot open a tty file Date: Fri, 21 Sep 2018 11:03:09 -0400 Message-ID: <87fty228r6.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) This is a follow up to http://lists.gnu.org/archive/html/emacs-devel/2018-09/msg00831.html. The crash can be invoked by doing the following: emacs -q -nw --daemon sudo chown differentuser:differentgroup $(tty) emacsclient -t . # error because the tty cannot be opened emacsclient -t . # SIGSEGV is received and Emacs crashes #0 __strcmp_sse2_unaligned () at ../sysdeps/x86_64/multiarch/strcmp-sse2-unaligned.S:31 #1 0x000000000050ca04 in get_named_terminal (name=0x7fffffff2990 "/dev/pts/7") at terminal.c:255 #2 0x000000000050a808 in init_tty (name=0x7fffffff2990 "/dev/pts/7", terminal_type=0x7fffffff2970 "screen-256color", must_succeed=false) at term.c:3958 #3 0x00000000004281c9 in Fmake_terminal_frame (parms=XIL(0x1281253)) at frame.c:1256 #4 0x000000000061863f in funcall_subr (subr=0x93b600 , numargs=1, args=0x7fffffff2b78) at eval.c:2929 #5 0x000000000061821c in Ffuncall (nargs=2, args=0x7fffffff2b70) at eval.c:2854 #6 0x0000000000664a25 in exec_byte_code (bytestr=XIL(0x9b89c4), vector=XIL(0x9b89e5), maxdepth=make_number(12), args_template=make_number(256), nargs=1, args=0x7fffffff3090) at bytecode.c:632 #7 0x0000000000618cb7 in funcall_lambda (fun=XIL(0x9b8995), nargs=1, arg_vector=0x7fffffff3088) at eval.c:3055 #8 0x0000000000618260 in Ffuncall (nargs=2, args=0x7fffffff3080) at eval.c:2856 #9 0x0000000000664a25 in exec_byte_code (bytestr=XIL(0x15ad434), vector=XIL(0xd7ddc5), maxdepth=make_number(3), args_template=make_number(257), nargs=1, args=0x7fffffff36a0) at bytecode.c:632 #10 0x0000000000618cb7 in funcall_lambda (fun=XIL(0x1309245), nargs=1, arg_vector=0x7fffffff3698) at eval.c:3055 #11 0x0000000000618260 in Ffuncall (nargs=2, args=0x7fffffff3690) at eval.c:2856 #12 0x0000000000617166 in Fapply (nargs=2, args=0x7fffffff3690) at eval.c:2431 #13 0x0000000000618560 in funcall_subr (subr=0xc7c220 , numargs=2, args=0x7fffffff3690) at eval.c:2909 #14 0x000000000061821c in Ffuncall (nargs=3, args=0x7fffffff3688) at eval.c:2854 #15 0x0000000000664a25 in exec_byte_code (bytestr=XIL(0x122cea4), vector=XIL(0x13710e5), maxdepth=make_number(15), args_template=make_number(128), nargs=1, args=0x7fffffff3ba0) at bytecode.c:632 #16 0x0000000000618cb7 in funcall_lambda (fun=XIL(0x1371165), nargs=1, arg_vector=0x7fffffff3ba0) at eval.c:3055 #17 0x0000000000618260 in Ffuncall (nargs=2, args=0x7fffffff3b98) at eval.c:2856 #18 0x0000000000664a25 in exec_byte_code (bytestr=XIL(0xa47434), vector=XIL(0xa47455), maxdepth=make_number(13), args_template=make_number(256), nargs=1, args=0x7fffffff4130) at bytecode.c:632 #19 0x0000000000618cb7 in funcall_lambda (fun=XIL(0xa473f5), nargs=1, arg_vector=0x7fffffff4128) at eval.c:3055 #20 0x0000000000618260 in Ffuncall (nargs=2, args=0x7fffffff4120) at eval.c:2856 #21 0x0000000000664a25 in exec_byte_code (bytestr=XIL(0x102fef4), vector=XIL(0x14499e5), maxdepth=make_number(12), args_template=make_number(771), nargs=3, args=0x7fffffff4648) at bytecode.c:632 #22 0x0000000000618cb7 in funcall_lambda (fun=XIL(0x1449ab5), nargs=3, arg_vector=0x7fffffff4630) at eval.c:3055 #23 0x0000000000618260 in Ffuncall (nargs=4, args=0x7fffffff4628) at eval.c:2856 #24 0x0000000000664a25 in exec_byte_code (bytestr=XIL(0x1032cc4), vector=XIL(0x14818e5), maxdepth=make_number(6), args_template=make_number(0), nargs=0, args=0x7fffffff4b58) at bytecode.c:632 #25 0x0000000000618cb7 in funcall_lambda (fun=XIL(0x1481995), nargs=0, arg_vector=0x7fffffff4b58) at eval.c:3055 #26 0x0000000000618260 in Ffuncall (nargs=1, args=0x7fffffff4b50) at eval.c:2856 #27 0x0000000000664a25 in exec_byte_code (bytestr=XIL(0x1032db4), vector=XIL(0x144c945), maxdepth=make_number(14), args_template=make_number(1799), nargs=7, args=0x7fffffff50f8) at bytecode.c:632 #28 0x0000000000618cb7 in funcall_lambda (fun=XIL(0x144ca85), nargs=7, arg_vector=0x7fffffff50c0) at eval.c:3055 #29 0x0000000000618260 in Ffuncall (nargs=8, args=0x7fffffff50b8) at eval.c:2856 #30 0x0000000000664a25 in exec_byte_code (bytestr=XIL(0x1032d04), vector=XIL(0x1481a15), maxdepth=make_number(8), args_template=make_number(0), nargs=0, args=0x7fffffff5590) at bytecode.c:632 #31 0x0000000000618cb7 in funcall_lambda (fun=XIL(0x1481a85), nargs=0, arg_vector=0x7fffffff5590) at eval.c:3055 #32 0x0000000000618260 in Ffuncall (nargs=1, args=0x7fffffff5588) at eval.c:2856 #33 0x0000000000664a25 in exec_byte_code (bytestr=XIL(0x10323b4), vector=XIL(0x144a945), maxdepth=make_number(6), args_template=make_number(257), nargs=1, args=0x7fffffff5ac0) at bytecode.c:632 #34 0x0000000000618cb7 in funcall_lambda (fun=XIL(0x144a975), nargs=1, arg_vector=0x7fffffff5ab8) at eval.c:3055 #35 0x0000000000618260 in Ffuncall (nargs=2, args=0x7fffffff5ab0) at eval.c:2856 #36 0x0000000000664a25 in exec_byte_code (bytestr=XIL(0x10323d4), vector=XIL(0x144ba05), maxdepth=make_number(35), args_template=make_number(514), nargs=2, args=0x7fffffff6328) at bytecode.c:632 #37 0x0000000000618cb7 in funcall_lambda (fun=XIL(0x144bcb5), nargs=2, arg_vector=0x7fffffff6318) at eval.c:3055 #38 0x0000000000618260 in Ffuncall (nargs=3, args=0x7fffffff6310) at eval.c:2856 #39 0x0000000000617494 in Fapply (nargs=2, args=0x7fffffff63d0) at eval.c:2474 #40 0x0000000000617a46 in apply1 (fn=XIL(0x33ef00), arg=XIL(0x15c8903)) at eval.c:2690 #41 0x00000000006755b5 in read_process_output_call (fun_and_args=XIL(0x15c88f3)) at process.c:5807 #42 0x0000000000614990 in internal_condition_case_1 ( bfun=0x675587 , arg=XIL(0x15c88f3), handlers=XIL(0x5340), hfun=0x6755b7 ) at eval.c:1395 #43 0x0000000000675e56 in read_and_dispose_of_process_output (p=0x1481700, chars=0x7fffffff6520 "id/Downloads/scala-2.8.1.final -env SDK=/home/jvshahid/Android/Sdk/ -env SHELL=/bin/zsh -env SHLVL=2 -env SSH_AUTH_SOCK=/home/jvshahid/.gnupg/S.gpg-agent.ssh -env TERM=screen-256color -env TMUX=/tmp/t"..., nbytes=1522, coding=0x10342b0) at process.c:6018 #44 0x0000000000675a77 in read_process_output (proc=XIL(0x1481705), channel=9) at process.c:5929 #45 0x0000000000674e0c in wait_reading_process_output (time_limit=4, nsecs=333410507, read_kbd=-1, do_display=true, wait_for_cell=XIL(0), wait_proc=0x0, just_wait_proc=0) at process.c:5626 #46 0x0000000000570b64 in kbd_buffer_get_event (kbp=0x7fffffff7a78, used_mouse_menu=0x0, end_time=0x7fffffff8050) at keyboard.c:3795 #47 0x000000000056ce0d in read_event_from_main_queue (end_time=0x7fffffff8050, local_getcjmp=0x7fffffff7e30, used_mouse_menu=0x0) at keyboard.c:2122 #48 0x000000000056d0ca in read_decoded_event_from_main_queue ( end_time=0x7fffffff8050, local_getcjmp=0x7fffffff7e30, prev_event=XIL(0), used_mouse_menu=0x0) at keyboard.c:2185 #49 0x000000000056e808 in read_char (commandflag=0, map=XIL(0), prev_event=XIL(0), used_mouse_menu=0x0, end_time=0x7fffffff8050) at keyboard.c:2773 #50 0x0000000000646171 in read_filtered_event (no_switch_frame=false, ascii_required=false, error_nonascii=false, input_method=true, seconds=make_number(5)) at lread.c:678 #51 0x00000000006464ad in Fread_event (prompt=XIL(0), inherit_input_method=XIL(0xc150), seconds=make_number(5)) at lread.c:794 #52 0x000000000061869b in funcall_subr (subr=0xc7ec00 , numargs=3, args=0x7fffffff8208) at eval.c:2934 #53 0x000000000061821c in Ffuncall (nargs=4, args=0x7fffffff8200) at eval.c:2854 #54 0x0000000000664a25 in exec_byte_code (bytestr=XIL(0x965774), vector=XIL(0x965795), maxdepth=make_number(7), args_template=make_number(769), nargs=1, args=0x7fffffff86e8) at bytecode.c:632 #55 0x0000000000618cb7 in funcall_lambda (fun=XIL(0x965745), nargs=1, arg_vector=0x7fffffff86e0) at eval.c:3055 #56 0x0000000000618260 in Ffuncall (nargs=2, args=0x7fffffff86d8) at eval.c:2856 #57 0x0000000000664a25 in exec_byte_code (bytestr=XIL(0x1032ef4), vector=XIL(0x144cab5), maxdepth=make_number(8), args_template=make_number(514), nargs=2, args=0x7fffffff8bd0) at bytecode.c:632 #58 0x0000000000618cb7 in funcall_lambda (fun=XIL(0x144cb15), nargs=2, arg_vector=0x7fffffff8bc0) at eval.c:3055 #59 0x0000000000618260 in Ffuncall (nargs=3, args=0x7fffffff8bb8) at eval.c:2856 #60 0x0000000000664a25 in exec_byte_code (bytestr=XIL(0x1032db4), vector=XIL(0x144c945), maxdepth=make_number(14), args_template=make_number(1799), nargs=7, args=0x7fffffff9168) at bytecode.c:632 #61 0x0000000000618cb7 in funcall_lambda (fun=XIL(0x144ca85), nargs=7, arg_vector=0x7fffffff9130) at eval.c:3055 #62 0x0000000000618260 in Ffuncall (nargs=8, args=0x7fffffff9128) at eval.c:2856 #63 0x0000000000664a25 in exec_byte_code (bytestr=XIL(0x1032d04), vector=XIL(0x1313f35), maxdepth=make_number(8), args_template=make_number(0), nargs=0, args=0x7fffffff9600) at bytecode.c:632 #64 0x0000000000618cb7 in funcall_lambda (fun=XIL(0x132c115), nargs=0, arg_vector=0x7fffffff9600) at eval.c:3055 #65 0x0000000000618260 in Ffuncall (nargs=1, args=0x7fffffff95f8) at eval.c:2856 #66 0x0000000000664a25 in exec_byte_code (bytestr=XIL(0x10323b4), vector=XIL(0x144a945), maxdepth=make_number(6), args_template=make_number(257), nargs=1, args=0x7fffffff9b30) at bytecode.c:632 #67 0x0000000000618cb7 in funcall_lambda (fun=XIL(0x144a975), nargs=1, arg_vector=0x7fffffff9b28) at eval.c:3055 #68 0x0000000000618260 in Ffuncall (nargs=2, args=0x7fffffff9b20) at eval.c:2856 #69 0x0000000000664a25 in exec_byte_code (bytestr=XIL(0x10323d4), vector=XIL(0x144ba05), maxdepth=make_number(35), args_template=make_number(514), nargs=2, args=0x7fffffffa398) at bytecode.c:632 #70 0x0000000000618cb7 in funcall_lambda (fun=XIL(0x144bcb5), nargs=2, arg_vector=0x7fffffffa388) at eval.c:3055 #71 0x0000000000618260 in Ffuncall (nargs=3, args=0x7fffffffa380) at eval.c:2856 #72 0x0000000000617494 in Fapply (nargs=2, args=0x7fffffffa440) at eval.c:2474 #73 0x0000000000617a46 in apply1 (fn=XIL(0x33ef00), arg=XIL(0x1228df3)) at eval.c:2690 #74 0x00000000006755b5 in read_process_output_call (fun_and_args=XIL(0x1228da3)) at process.c:5807 #75 0x0000000000614990 in internal_condition_case_1 ( bfun=0x675587 , arg=XIL(0x1228da3), handlers=XIL(0x5340), hfun=0x6755b7 ) at eval.c:1395 #76 0x0000000000675e56 in read_and_dispose_of_process_output (p=0x14385e0, chars=0x7fffffffa590 "id/Downloads/scala-2.8.1.final -env SDK=/home/jvshahid/Android/Sdk/ -env SHELL=/bin/zsh -env SHLVL=2 -env SSH_AUTH_SOCK=/home/jvshahid/.gnupg/S.gpg-agent.ssh -env TERM=screen-256color -env TMUX=/tmp/t"..., nbytes=1522, coding=0x10342b0) at process.c:6018 #77 0x0000000000675a77 in read_process_output (proc=XIL(0x14385e5), channel=9) at process.c:5929 #78 0x0000000000674e0c in wait_reading_process_output (time_limit=0, nsecs=0, read_kbd=-1, do_display=true, wait_for_cell=XIL(0), wait_proc=0x0, just_wait_proc=0) at process.c:5626 #79 0x0000000000570d03 in kbd_buffer_get_event (kbp=0x7fffffffbae8, used_mouse_menu=0x7fffffffc095, end_time=0x0) at keyboard.c:3816 #80 0x000000000056ce0d in read_event_from_main_queue (end_time=0x0, local_getcjmp=0x7fffffffbea0, used_mouse_menu=0x7fffffffc095) at keyboard.c:2122 #81 0x000000000056d0ca in read_decoded_event_from_main_queue (end_time=0x0, local_getcjmp=0x7fffffffbea0, prev_event=XIL(0), used_mouse_menu=0x7fffffffc095) at keyboard.c:2185 #82 0x000000000056e808 in read_char (commandflag=1, map=XIL(0x122bc83), prev_event=XIL(0), used_mouse_menu=0x7fffffffc095, end_time=0x0) at keyboard.c:2773 #83 0x000000000057b7cc in read_key_sequence (keybuf=0x7fffffffc2a0, prompt=XIL(0), dont_downcase_last=false, can_return_switch_frame=true, fix_current_buffer=true, prevent_redisplay=false) at keyboard.c:9121 #84 0x000000000056ad97 in command_loop_1 () at keyboard.c:1338 #85 0x00000000006148e9 in internal_condition_case (bfun=0x56a947 , handlers=XIL(0x5340), hfun=0x56a0f4 ) at eval.c:1371 #86 0x000000000056a63a in command_loop_2 (ignore=XIL(0)) at keyboard.c:1079 #87 0x000000000061416f in internal_catch (tag=XIL(0xc7e0), func=0x56a611 , arg=XIL(0)) at eval.c:1136 #88 0x000000000056a5dc in command_loop () at keyboard.c:1058 #89 0x0000000000569cc9 in recursive_edit_1 () at keyboard.c:703 #90 0x0000000000569e4b in Frecursive_edit () at keyboard.c:774 #91 0x0000000000567a49 in main (argc=4, argv=0x7fffffffc708) at emacs.c:1724 Lisp Backtrace: "make-terminal-frame" (0xffff2b78) "tty-create-frame-with-faces" (0xffff3088) 0x1309240 PVEC_COMPILED "apply" (0xffff3690) "frame-creation-function" (0xffff3ba0) "make-frame" (0xffff4128) "server-create-tty-frame" (0xffff4630) 0x1481990 PVEC_COMPILED "server-execute" (0xffff50c0) 0x1481a80 PVEC_COMPILED "server-execute-continuation" (0xffff5ab8) "server-process-filter" (0xffff6318) "read-event" (0xffff8208) "sit-for" (0xffff86e0) "server-return-error" (0xffff8bc0) "server-execute" (0xffff9130) 0x132c110 PVEC_COMPILED "server-execute-continuation" (0xffff9b28) "server-process-filter" (0xffffa388) In GNU Emacs 27.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.18.9) of 2018-09-15 built on amun Repository revision: f1ddaf7b65bb8edac41813b48f96a84c7fc2e263 Windowing system distributor 'The X.Org Foundation', version 11.0.11804000 System Description: Linux Mint 18.3 Configured using: 'configure --prefix=/home/jvshahid/bin/emacs-27 --with-xpm=no --with-jpeg=no --with-gif=no --with-tiff=no' Configured features: PNG SOUND DBUS GSETTINGS GLIB NOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM THREADS GMP Important settings: value of $LANG: en_US.UTF-8 value of $XMODIFIERS: @im=none locale-coding-system: utf-8-unix From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 21 11:31:07 2018 Received: (at 32794) by debbugs.gnu.org; 21 Sep 2018 15:31:07 +0000 Received: from localhost ([127.0.0.1]:48366 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g3NOd-0003VF-1I for submit@debbugs.gnu.org; Fri, 21 Sep 2018 11:31:07 -0400 Received: from mail-qt1-f179.google.com ([209.85.160.179]:44079) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g3NOb-0003Um-Mh for 32794@debbugs.gnu.org; Fri, 21 Sep 2018 11:31:06 -0400 Received: by mail-qt1-f179.google.com with SMTP id k38-v6so2086339qtk.11 for <32794@debbugs.gnu.org>; Fri, 21 Sep 2018 08:31:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:references:date:in-reply-to:message-id:user-agent :mime-version; bh=PVUZf/KZhFdwLzKhbypz2P2tf2czek/kOSfcO36m6q0=; b=Xh0S6ADDOadPRcFj62CQllq+O4qZDgQEMKe1+FQLBCs1lgnVjqCAew1IOyXKs1GZmp 1bD8OgQ+xaz9TJUWHsFajKMlXGObuXSxU86THXw6IhLlpolayvCJ8tfMsDrCyQXjvW68 OwD8Ksm967hveRdLTfvdAU9rxrkwOQ8Y9aHvEvbxVXw8RyIgdkEo+GvkB66c2yIVv6kR eqWIGUE3sN828uD5/irMnWAY9KT2YDNnrjM9lLK0X3xv8IO7HOmdNeEN4hjEypf9sutK 7J2cKGNBhfJx+G431c2lQ8cmu1LDft3vgtDpU1/erGI86OqsOKO2WymbBs00ROECy+PA 9oYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=PVUZf/KZhFdwLzKhbypz2P2tf2czek/kOSfcO36m6q0=; b=BGtOX6m3lwi/+2PUMIno0mxg2nbuzE2ykCHxo8YclRSCdYhChDE49ojGuNip2cIXCl dQEldi6/CL/OV/uTYhKgonwfg1cSn1KTq6K5oqASRNFTb7rkvcC7FlXe/GYmWrigmTig +vE8Xt9F50hXSlF2APuLnFtDjAk8fugIXamMUZQ0kZ+Q2D2vlglPG349/jRxTF2QSRbY RtOoLvEW/BoVKHN83DQ0995gkOzCCSTxgvqJOGThvzNchpNgwqMtxPATuDY29nI1KquL 3HXgTew/X5dZQ8ULocJOpeuhZvdHevHSaP1F891KGCxFp6XUUIGYWtrU7ZoupAO1cAXu cMYg== X-Gm-Message-State: APzg51DOHb8nORBbTvgTyFQI2kUYih7z25wq5Y/+cKAQfdC5kOISEOJj Acc1848uMQgBsDYEYz80sfAOeOqr X-Google-Smtp-Source: ANB0VdYYMM1SoxUEkUK4B9JSs4ZRnwvGv/HVUyaGVb6WS7A3dsYICNM6TrYMJwePx0aLCpiAEKqv8w== X-Received: by 2002:a0c:93ac:: with SMTP id f41-v6mr31300147qvf.151.1537543859640; Fri, 21 Sep 2018 08:30:59 -0700 (PDT) Received: from amun ([142.154.219.2]) by smtp.gmail.com with ESMTPSA id q75-v6sm5531551qki.17.2018.09.21.08.30.58 for <32794@debbugs.gnu.org> (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 21 Sep 2018 08:30:58 -0700 (PDT) From: John Shahid To: 32794@debbugs.gnu.org Subject: Re: bug#32794: 27.0.50; emacsclient crashes on subsequent invocation when it cannot open a tty file References: <87fty228r6.fsf@gmail.com> Date: Fri, 21 Sep 2018 11:30:54 -0400 In-Reply-To: <87fty228r6.fsf@gmail.com> (John Shahid's message of "Fri, 21 Sep 2018 11:03:09 -0400") Message-ID: <87a7oa27gx.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 32794 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain Attached a patch that fixes the issue. --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-Cleanup-the-terminal-if-emacs_open-fails.-Bug-32794.patch >From 221bbe45fc7e98cdef5b95394be96bd73f667709 Mon Sep 17 00:00:00 2001 From: John Shahid Date: Fri, 21 Sep 2018 11:15:10 -0400 Subject: [PATCH] Cleanup the terminal if emacs_open fails. (Bug#32794) * src/term.c (init_tty): Call delete_terminal_internal if emacs_open fail. * src/terminal.c (delete_terminal): Move some code into delete_terminal_internal and call it. * src/terminal.c (delete_terminal_internal): * src/termhooks.h: Introduce 'delete_terminal_internal' to delete terminals that haven't been fully initialized. --- src/term.c | 1 + src/termhooks.h | 1 + src/terminal.c | 9 ++++++++- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/term.c b/src/term.c index ce24f6915f..852dc23bd6 100644 --- a/src/term.c +++ b/src/term.c @@ -4008,6 +4008,7 @@ init_tty (const char *name, const char *terminal_type, bool must_succeed) char const *diagnostic = (fd < 0) ? "Could not open file: %s" : "Not a tty device: %s"; emacs_close (fd); + delete_terminal_internal (terminal); maybe_fatal (must_succeed, terminal, diagnostic, diagnostic, name); } diff --git a/src/termhooks.h b/src/termhooks.h index 211429169b..4e34105510 100644 --- a/src/termhooks.h +++ b/src/termhooks.h @@ -733,6 +733,7 @@ extern struct terminal *get_named_terminal (const char *); extern struct terminal *create_terminal (enum output_method, struct redisplay_interface *); extern void delete_terminal (struct terminal *); +extern void delete_terminal_internal (struct terminal *); extern Lisp_Object terminal_glyph_code (struct terminal *, int); /* The initial terminal device, created by initial_term_init. */ diff --git a/src/terminal.c b/src/terminal.c index 18982fe704..e480359257 100644 --- a/src/terminal.c +++ b/src/terminal.c @@ -314,7 +314,6 @@ create_terminal (enum output_method type, struct redisplay_interface *rif) void delete_terminal (struct terminal *terminal) { - struct terminal **tp; Lisp_Object tail, frame; /* Protect against recursive calls. delete_frame calls the @@ -335,6 +334,14 @@ delete_terminal (struct terminal *terminal) } } + delete_terminal_internal (terminal); +} + +void +delete_terminal_internal (struct terminal *terminal) +{ + struct terminal **tp; + for (tp = &terminal_list; *tp != terminal; tp = &(*tp)->next_terminal) if (! *tp) emacs_abort (); -- 2.18.0 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 29 02:35:25 2018 Received: (at 32794-done) by debbugs.gnu.org; 29 Sep 2018 06:35:25 +0000 Received: from localhost ([127.0.0.1]:58223 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g68qb-0003GH-48 for submit@debbugs.gnu.org; Sat, 29 Sep 2018 02:35:25 -0400 Received: from eggs.gnu.org ([208.118.235.92]:56660) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g68qZ-0003G3-Ph for 32794-done@debbugs.gnu.org; Sat, 29 Sep 2018 02:35:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g68qP-0002rw-RS for 32794-done@debbugs.gnu.org; Sat, 29 Sep 2018 02:35:18 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:44418) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g68qP-0002ri-Dz; Sat, 29 Sep 2018 02:35:13 -0400 Received: from [176.228.60.248] (port=2445 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1g68qN-0000Xr-5Z; Sat, 29 Sep 2018 02:35:13 -0400 Date: Sat, 29 Sep 2018 09:34:58 +0300 Message-Id: <834le87qwd.fsf@gnu.org> From: Eli Zaretskii To: John Shahid In-reply-to: <87a7oa27gx.fsf@gmail.com> (message from John Shahid on Fri, 21 Sep 2018 11:30:54 -0400) Subject: Re: bug#32794: 27.0.50; emacsclient crashes on subsequent invocation when it cannot open a tty file References: <87fty228r6.fsf@gmail.com> <87a7oa27gx.fsf@gmail.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 32794-done Cc: 32794-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.0 (------) > From: John Shahid > Date: Fri, 21 Sep 2018 11:30:54 -0400 > > Attached a patch that fixes the issue. Thanks, pushed to the emacs-26 branch, and closing the bug. From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 29 08:11:15 2018 Received: (at 32794-done) by debbugs.gnu.org; 29 Sep 2018 12:11:15 +0000 Received: from localhost ([127.0.0.1]:58369 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g6E5a-00054O-R8 for submit@debbugs.gnu.org; Sat, 29 Sep 2018 08:11:15 -0400 Received: from mail-qk1-f181.google.com ([209.85.222.181]:38818) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g6E5Y-000546-LS for 32794-done@debbugs.gnu.org; Sat, 29 Sep 2018 08:11:13 -0400 Received: by mail-qk1-f181.google.com with SMTP id 204-v6so4821888qkd.5 for <32794-done@debbugs.gnu.org>; Sat, 29 Sep 2018 05:11:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:message-id:in-reply-to :date:mime-version; bh=5WdPzq6TMNhWx/qbWIq+DJCIBS6w2LyJRXiUY5xdJhw=; b=XN6ejJnMj5NEoqFPfwRiXaAyBbLefWjyL7jWY26TS0DK4kDXHkH1DXxVfgTHCweple NmGiLDELqu3W0XPD4Mnk3Ki3cgYsCLfSotOAiZV5JkFJtXVayWxYw/n9hqiSicY96lT/ md/7EH/atwV7CFIaPW5B11p4szC17I44AsakpOCjhsldApNK5gSD2Z2F1FUvhbFo7phw nmfbn36QZbZjGkaJQch+ArXnVIV4if6+X54zOpEi7khGo246baqgGajrvLQ+/cjTnq7A fe1kXpr83hTdU1Gy+1ge5j7YUpIUr7VTY/iMoMTdfNzQpgtDU3jxDAFABK4iNTNWJdQJ dKyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :message-id:in-reply-to:date:mime-version; bh=5WdPzq6TMNhWx/qbWIq+DJCIBS6w2LyJRXiUY5xdJhw=; b=Fpu2xNrE7MSApGMdD9w00crG3U0OqCrwBCge6D554ZZ3F0yrOyqpZ+mAODXuE4UStL EXPdDjRz8KMorheIxmZBGCPzG7IH2NPS3Jv/6vrgHLjioFTaM6d8mcJwi7nS/aGp9ZXg bXaF4ud//CmF/L9wT6p12ic4T5OcoGVr0J95TA8N7R1BCgtWRaC4Vrt4w7qYimfb2LAr Y89jOCB84hXg89RCeFtt1KlEbk8FZSVUPdKt/6UizbD4qh8hwxnj2t9BozmfUILq0ZX0 L+KnfSsFBAfMalL0EcqIV+hm3/5z7lpzRTFEuwGVmbas9PslQGIBfcZywE1vdpYRMKJq JEYQ== X-Gm-Message-State: ABuFfoiBCBJyAJvRCpI7Km/DD+4MnAUmYuu1AC756N8D61OBEVq/eRJ/ XKNuLFONUzNg14/s8xTWgiOpNOcd X-Google-Smtp-Source: ACcGV60joHvP4FCZ1LEDNlhyQi5pa9yIXxvSks8NQAbJL38wjFPcHOwsgquh17dNyGjskWfdj0riMA== X-Received: by 2002:a37:1f88:: with SMTP id n8-v6mr2105435qkh.64.1538223066856; Sat, 29 Sep 2018 05:11:06 -0700 (PDT) Received: from amun (cpe-104-162-86-217.nyc.res.rr.com. [104.162.86.217]) by smtp.gmail.com with ESMTPSA id r82-v6sm5943321qkh.28.2018.09.29.05.11.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 29 Sep 2018 05:11:06 -0700 (PDT) References: <87fty228r6.fsf@gmail.com> <87a7oa27gx.fsf@gmail.com> <834le87qwd.fsf@gnu.org> User-agent: mu4e 1.1.0; emacs 27.0.50 From: John Shahid To: Eli Zaretskii Subject: Re: bug#32794: 27.0.50; emacsclient crashes on subsequent invocation when it cannot open a tty file Message-ID: <87k1n44i7j.fsf@gmail.com> In-reply-to: <834le87qwd.fsf@gnu.org> Date: Sat, 29 Sep 2018 08:11:02 -0400 MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 32794-done Cc: 32794-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Thanks Eli! Eli Zaretskii writes: >> From: John Shahid >> Date: Fri, 21 Sep 2018 11:30:54 -0400 >> >> Attached a patch that fixes the issue. > > Thanks, pushed to the emacs-26 branch, and closing the bug. From unknown Mon Aug 18 11:17:36 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sun, 28 Oct 2018 11:24:05 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator