LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-04-2008, 10:22 PM   #1
debuser123
Member
 
Registered: Nov 2006
Distribution: Ubuntu Hardy
Posts: 69

Rep: Reputation: 15
Question I need to kill getty....how can I?


I need to kill getty, which is set up to run on a serial port (via /etc/inittab):

::respawn:/sbin/getty -L ttyS0 115200 vt100

the problem is killing it of course respawns it and secondly, I cannot modify /etc/inittab since the root file system is read-only (embedded device).

I've tried sending it signals 24 and 25 to just pause it but they end up respawning.

All I need to do is reclaim that serial port so my own app can retrieve data from it; getty eats up 90% of the data received through it. What can I do?

PS: I have no need for the tty on the serial port; this particular device creates a network interface through the usb port so that I can connect to it over TCP/IP.

Last edited by debuser123; 03-04-2008 at 10:43 PM.
 
Old 03-05-2008, 03:36 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Do
Code:
       SIGSTOP   17,19,23    Stop    Stop process
       SIGTSTP   18,20,24    Stop    Stop typed at tty
       SIGTTIN   21,21,26    Stop    tty input for background process
       SIGTTOU   22,22,27    Stop    tty output for background process
help?

And as for "embedded device" - how did the install get on there, can't you
re-do that step?


Cheers,
Tink
 
Old 03-05-2008, 08:38 PM   #3
debuser123
Member
 
Registered: Nov 2006
Distribution: Ubuntu Hardy
Posts: 69

Original Poster
Rep: Reputation: 15
Signal 19 (SIGSTOP) seems to work, I thought I had already tried that; it pauses getty (verified with a process state of "T" in ps). I don't know if this is the same issue or not (as in, related to getty), but it seems read() doesn't read from the port unless I interrupt with a SIGINT (ctrl+c).

read() (in blocking operation) puts a thread to sleep 'til the data arrives, then wakes the thread up, passing along the data. The problem is, data arrives, but read() doesn't wake me up...unless I ctrl+c [SIGINT]. Then all my cout's show up with the data that was retrieved 20 seconds ago before I hit ctrl+c.

Could getty [even though paused] be the culprit?

PS: this might need to be moved to programming or another section.

Last edited by debuser123; 03-05-2008 at 08:41 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Help my getty is being a yetti!! Law1213 Slackware 6 06-24-2006 02:07 AM
Getting getty to run. kulmis Debian 2 09-03-2004 01:51 PM
What is getty? swmok Linux - Software 2 07-07-2004 05:54 AM
getty in RedHat 8.0 kprocter Linux - General 1 06-02-2003 10:23 AM
Autologin Getty rch Linux - Security 5 04-15-2003 01:04 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:03 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration