• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: How to get scripting to work without NSApplication
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to get scripting to work without NSApplication


  • Subject: Re: How to get scripting to work without NSApplication
  • From: Ingvar Nedrebo <email@hidden>
  • Date: Tue, 11 Dec 2001 09:52:18 +0000

On Tuesday, December 11, 2001, at 05:32 , Jason Bobier wrote:

Ah... That's clever. I'll give that a try.

According to the POSIX standard write() is one of the calls that you can make from a signal handler.

I didn't know that, thanks for that tidbit. Although, I have no idea
how POSIX-compliant Darwin is.

I.


Thanx,

Jason

On Monday, December 10, 2001, at 07:52 AM, Ingvar Nedrebo wrote:

Jason,

I had exactly the same issue as you and was told not to use
any Cocoa calls in a signal handler. My solution was to create
an NSPipe, do a readInBackgroundAndNotify on the read end,
and then from the signal handler just do a write(2) directly
on the write-end file descriptor.

This works well, and I later saw on the Darwin developers
mailing list somebody recommending this writing-to-a-pipe
from a signal handler trick, so I guess it is pretty safe.

I.
--
Jason A. Bobier email@hidden
Tech Lead, PGP Macintosh Products http://www.prismatix.com/
Network Associates, Inc. Nothing's constant

PGPKey: <http://keys.pgp.com:11371/pks/lookup?op=get&search=0xF6F83318>
Fingerprint: 7809 7E6E BCCA 903D 4618 9740 EB10 9DF9 F6F8 3318


References: 
 >Re: How to get scripting to work without NSApplication (From: Jason Bobier <email@hidden>)

  • Prev by Date: ucd-snmp-4.2.2
  • Next by Date: Re: Does 10.1 fix NSOutlineView bugs?
  • Previous by thread: Re: How to get scripting to work without NSApplication
  • Next by thread: Re: How to get scripting to work without NSApplication
  • Index(es):
    • Date
    • Thread