5 messages in net.java.dev.jna.usersRe: [jna-users] Help required with ...
FromSent OnAttachments
rzoAug 16, 2008 7:40 am 
Daniel KaufmannAug 16, 2008 10:42 am 
rzoAug 19, 2008 10:02 am 
Timothy WallAug 19, 2008 10:43 am.java
Daniel KaufmannAug 19, 2008 5:55 pm 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: [jna-users] Help required with fork/execActions...
From:Timothy Wall (twal@dev.java.net)
Date:Aug 19, 2008 10:43:35 am
List:net.java.dev.jna.users
Attachments:

I've gotten this to work on OSX with seemingly irrelevant tweaking (the code as posted didn't work initially), so it might be a timing issue with resource conflicts.

Attached a version that works for me on OSX.

On Aug 19, 2008, at 1:10 PM, rzo wrote:

Daniel,

thanks for the reply.

Concerning " the JVM does not expect this to happen": Why would the JVM not expect this to happen ? Take a look at the implementation of Runtime.exec(). It is implemented using JNI call to fork/execv.

Given that the java Process class does work as I expect it, I have reimplemented it using JNA. With JNA I hope that I can keep my c-compiler and linker in the cupboard. For windows JNA does a perfect job.

I am now trying to implement the same for Linux/Unix.

As stated, the fork works fine. A second process is spawned. However, execv does not seem to work. There is a thread on this mail list with a similar issue. However it seems that the issue was not solved.