LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 07-27-2005, 08:58 PM   #1
mqureshi
LQ Newbie
 
Registered: Jul 2005
Posts: 6

Rep: Reputation: 0
Question Regarding tapisrv process


Good Day,
i have opened a device on the linux /dev directory. the same device is opened by the system process "tapisrv". Since tapisrv has issued a *select* system call on that File descriptor that corresponds to that device.. it is basically waiting for a write to occur on it so it can read it.. Now since i opened that device, i also issued a select system call on it.. since i issue the select system call after tapisrv... my process overrides tapisrv and i receive the notification first so i can read it before tapisrv.... however, sometimes it does happen that tapisrv restarts the process or re-issues the select call in which case it over rides my call..

it happens very rarely but sometimes tapisrv wins.. is there a way to gaurantee reading it before tapisrv..?

i would appreciate if someone can provide feedback. This is my first post so please dont let me down...

Thanks alot,

-MAQ
 
Old 07-27-2005, 09:06 PM   #2
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
If you're looking to read from a fifo, stream or similar (non-block) device, the data can only be read once. Trying to read/select on read ready from multiple processes is a bad idea. If you really need to read before 'tapisrv', why don't you just insert your code between the two, and reoutput anything you want tapisrv to get ahold of.
 
Old 07-28-2005, 07:39 AM   #3
mqureshi
LQ Newbie
 
Registered: Jul 2005
Posts: 6

Original Poster
Rep: Reputation: 0
Thanks for replying

i am trying to read from /dev/mux device which is a multiplexer or something which reads from the modem as soon as a msg is available. The thing is that Mux device is ready to be read twice. i read it for the first time and then want to decide whether to read it again and the msg will be blocked or let the device native code.. as tapisrv read it and handle it...

how can i insert my code in b/w ? tapisrv is a kernel process built on the phone.. it starts automatically.. are u suggesting me to intercept the process by interfereproc or something or write a kernel code and apply patch ? i cant write kernel code cos i dont know how to apply patch.

is there any other way to insert or intercept tapisrv's code ? do you know something about psuedo tty ? i read about it but dont know what it is or if that can be used to create some master/slave relation

would appreciate your help
thanks
 
  


Reply



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
how a father process know which child process send the signal SIGCHLD icoming Programming 10 07-20-2010 07:26 AM
regarding tapisrv process mqureshi Linux - Newbie 1 07-29-2005 03:53 PM
how can i get the process id on exec a process antony_csf Linux - Software 1 06-17-2004 03:06 AM
Bash Scripting - child process affecting parent process mthaddon Linux - General 1 05-02-2004 01:19 PM
problem with binding process and than execute another process chapa Programming 0 08-27-2003 03:47 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 10:38 PM.

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