Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c++ > #14534
| Date | 2012-02-27 08:58 +0100 |
|---|---|
| From | Willy <gruppi@willygroup.org> |
| Newsgroups | comp.lang.c++ |
| Subject | Troubles when processes try to access to a char device |
| Message-ID | <4f4b37c7$1@extreme.x-privat.org> (permalink) |
| Organization | X-Privat.Org NNTP Server - http://www.x-privat.org |
Hi,
I'm building a multi process application under Linux.
In the main process I initialize a char device and put is file
descriptor in a variable dev_fd in the shared memory area.
## Main Process ##
...
dev_fd = open("/dev/mydev",O_RDWR))
...
In the other processes I want to use the device in this way:
## Other Processes ##
...
read(dev_fd, buffer);
...
write(dev_fd, buffer);
...
but "read" function always returns 255, while "write" function doesn't
write the device :(
Where is the problem?
Thanks,
--
*Willy* - *Contatti*: http://snipurl.com/contatti
* *FAQ* di /it-alt.comp.software.mozilla/: http://www.FAQmozilla.org
* *Gratuiki* - Software Free: http://gratuiki.willygroup.org
Back to comp.lang.c++ | Previous | Next — Next in thread | Find similar | Unroll thread
Troubles when processes try to access to a char device Willy <gruppi@willygroup.org> - 2012-02-27 08:58 +0100
Re: Troubles when processes try to access to a char device gwowen <gwowen@gmail.com> - 2012-02-27 05:19 -0800
Re: Troubles when processes try to access to a char device Willy <gruppi@willygroup.org> - 2012-02-27 14:41 +0100
Re: Troubles when processes try to access to a char device gwowen <gwowen@gmail.com> - 2012-02-27 07:08 -0800
Re: Troubles when processes try to access to a char device Willy <gruppi@willygroup.org> - 2012-02-27 16:42 +0100
Re: Troubles when processes try to access to a char device gwowen <gwowen@gmail.com> - 2012-02-27 09:29 -0800
Re: Troubles when processes try to access to a char device Dan Oxender <d?n.oxe????@gmail.com> - 2012-02-28 09:06 -0700
Re: Troubles when processes try to access to a char device Alain Ketterlin <alain@dpt-info.u-strasbg.fr> - 2012-02-27 14:38 +0100
csiph-web