From: "Cédric Chépied" <cedric.chepied@gmail.com>
To: Andreas Schwab <schwab@suse.de>
Cc: emacs-devel@gnu.org
Subject: Re: emacs: send break on serial port
Date: Tue, 10 Jun 2014 13:13:43 +0200 [thread overview]
Message-ID: <5396e869.cb4bb40a.408d.ffffbf19@mx.google.com> (raw)
In-Reply-To: <mvmmwdl9ltt.fsf@hawking.suse.de>
At Tue, 10 Jun 2014 11:05:02 +0200,
Andreas Schwab wrote:
> process-send-break would be a better name.
bf9d1518e58f8ffb2f009ad958a6e30f2037cd3f HEAD master
Author: Cédric Chépied <cedric.chepied@gmail.com>
Date: Tue Jun 10 09:17:31 2014 +0200
Add a function to send a break via serial process
This is useful to use sysrq keys
1 file changed, 19 insertions(+)
src/process.c | 19 +++++++++++++++++++
Modified src/process.c
diff --git a/src/process.c b/src/process.c
index b8b8eaa..e1eea88 100644
--- a/src/process.c
+++ b/src/process.c
@@ -844,6 +844,24 @@ record_deleted_pid (pid_t pid, Lisp_Object filename)
}
+DEFUN ("process-send-break", Fprocess_send_break, Sprocess_send_break, 1, 1, 0,
+ doc: /* Send a break to the serial process PROCESS.
+PROCESS may be a process, a buffer, the name of a process or buffer, or
+nil, indicating the current buffer's process. */)
+ (register Lisp_Object process)
+{
+ register struct Lisp_Process *p;
+
+ process = get_process (process);
+ p = XPROCESS (process);
+
+ if (SERIALCONN1_P (p) && p->outfd >= 0)
+ ioctl(p->outfd, TCSBRK, 0);
+
+ return Qnil;
+}
+
+
DEFUN ("delete-process", Fdelete_process, Sdelete_process, 1, 1, 0,
doc: /* Delete PROCESS: kill it and forget about it immediately.
PROCESS may be a process, a buffer, the name of a process or buffer, or
@@ -7320,6 +7338,7 @@ The variable takes effect when `start-process' is called. */);
defsubr (&Sprocessp);
defsubr (&Sget_process);
+ defsubr (&Sprocess_send_break);
defsubr (&Sdelete_process);
defsubr (&Sprocess_status);
defsubr (&Sprocess_exit_status);
Regards,
--
Cédric Chépied
<cedric.chepied@gmail.com>
next prev parent reply other threads:[~2014-06-10 11:13 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-10 6:59 emacs: send break on serial port Cédric Chépied
2014-06-10 9:05 ` Andreas Schwab
2014-06-10 11:13 ` Cédric Chépied [this message]
2014-06-10 20:28 ` Stefan Monnier
2014-06-10 9:13 ` Leo Liu
2014-06-10 10:58 ` Cédric Chépied
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5396e869.cb4bb40a.408d.ffffbf19@mx.google.com \
--to=cedric.chepied@gmail.com \
--cc=emacs-devel@gnu.org \
--cc=schwab@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.