On Thu, Apr 23, 2009 at 2:20 AM, Greg Freemyer wrote:
> On Wed, Apr 22, 2009 at 3:38 PM, Rohit Sharma wrote:
>> Arun, i suggest that if you are using this for IPC then , better use pipes.
>>
>> And if you really want to use fd in another application then
>> pass the file descriptor to exec after
On Wed, Apr 22, 2009 at 3:38 PM, Rohit Sharma wrote:
> Arun, i suggest that if you are using this for IPC then , better use pipes.
>
> And if you really want to use fd in another application then
> pass the file descriptor to exec after doing a fork.
>
> something like this.
>
> in application_1
>
Arun, i suggest that if you are using this for IPC then , better use pipes.
And if you really want to use fd in another application then
pass the file descriptor to exec after doing a fork.
something like this.
in application_1
ret = fork();
if(ret == 0){
sprintf(buff, "%d", fd_1);
(void)exec(
On Wed, Apr 22, 2009 at 5:12 AM, Arun raj wrote:
>
> On Wed, Apr 22, 2009 at 5:56 PM, pradeep singh
> wrote:
>>
>> On Wed, Apr 22, 2009 at 1:33 PM, Arun raj
>> wrote:
>> > Hello All,
>> >
>> > I want to use the file descriptor opened by application_1 in another
>> > application_2, i.e
>> >
>>
pipes.
On Wed, Apr 22, 2009 at 2:42 PM, Arun raj wrote:
> Thanks a lot pradip.
>
> I would like to know is there any method/mechanism/logic to share
> fd opened by application_1 which can be used in application_2.
>
> On Wed, Apr 22, 2009 at 5:56 PM, pradeep singh
> wrote:
>>
>> On Wed, Apr 22
1. I think application_2 can open the file /proc//fds/
but then they are not really sharing the same fd but merely opening the
same file
2. you can try looking at http://phook.sourceforge.net/ they use ptrace
to read/write from another process fd
Hayim.
On Wed, 2009-04-22 at 14:26 +0530, prad
Thanks a lot pradip.
I would like to know is there any method/mechanism/logic to share
fd opened by application_1 which can be used in application_2.
On Wed, Apr 22, 2009 at 5:56 PM, pradeep singh wrote:
> On Wed, Apr 22, 2009 at 1:33 PM, Arun raj
> wrote:
> > Hello All,
> >
> > I want to us
On Wed, Apr 22, 2009 at 1:33 PM, Arun raj wrote:
> Hello All,
>
> I want to use the file descriptor opened by application_1 in another
> application_2, i.e
>
> ./application_1 :
> main()
> {
> fd_1 = open( file );
> return fd_1;
> }
>
> ./application_2 fd_1
> main()
> {
> ret = read
Hello All,
I want to use the file descriptor opened by application_1 in another
application_2, i.e
./application_1 :
main()
{
fd_1 = open( file );
return fd_1;
}
./application_2 fd_1
main()
{
ret = read( fd_1 );
return fd;
}
My concern is once application_1 main returns all o