Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c++ > #14541
| Date | 2012-02-27 14:41 +0100 |
|---|---|
| From | Willy <gruppi@willygroup.org> |
| Newsgroups | comp.lang.c++ |
| Subject | Re: Troubles when processes try to access to a char device |
| References | <4f4b37c7$1@extreme.x-privat.org> <b3e184a9-e202-4d49-a936-272876efdc51@l14g2000vbe.googlegroups.com> |
| Message-ID | <4f4b8821$2@extreme.x-privat.org> (permalink) |
| Organization | X-Privat.Org NNTP Server - http://www.x-privat.org |
Il 27/02/2012 14:19, gwowen ha scritto:
> How are you sharing the file descriptor between processes?
The file descriptor is an attribute of an object which is in a shared
memory area.
The code is like that:
## shared memory ##
class my_obj
{
fd;
public:
init()
{
...
fd = open("/dev/my_device");
...
};
int read_data()
{
return read(fd, buffer);
}
void write_data(data)
{
buffer = data;
write(fd, buffer);
}
}
--
*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 — Previous in thread | 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