Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: how can i know from the java code that an applescript completed to run? - urgent



Greg Guerin wrote:

Doug Zwick wrote:

The IPC buffers used by the streams are quite small (IIRC they are on the
order of 256 bytes).

A few months ago, I had a need to know exactly how big the pipe buffers
were, so I write a Java program to help me find out. Across several machines
running 10.4, the buffer is 16KB in length, which is larger than I expected.


However, this could vary for any number of reasons, and is not guaranteed
by any parameter or configurable value in the OS I could find. My guess is
it's wired into a kernel header file somewhere, but that's just a guess.


Below is the test program I wrote. It's an informative exercise to
intentionally try to deadlock a parent process. I recommend it highly.


This one deadlocks at 16385 or above, but ends normally at 16384 or below,
at least for me. YMMV.

Thats amazingly large, and should make most simple commands pretty safe. I would think that the Java version is as important as the OS version, but 1.3.1 and 1.4.2 all show the same limit. I'd try it under 10.2 and 10.3 too, but I recently switched to an Intel Mac, so doing that is much less convenient.


This deadlock is not limited to Java applications, I've seen the same deadlock in C/C++ apps using Unix pipes and fork/exec.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden


This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.