launchd

How to limit memory of a OS X program? ulimit -v neither -m are working

风流意气都作罢 提交于 2019-12-17 06:35:21
问题 My programs run out of memory like half of the time I run them. Under Linux I can set a hard limit to the available memory using ulimit -v mem-in-kbytes. Actually, I use ulimit -S -v mem-in-kbytes, so I get a proper memory allocation problem in the program and I can abort. But... ulimit is not working in OSX 10.6. I've tried with -s and -m options, and they are not working. In 2008 there was some discussion about the same issue in MacRumors, but nobody proposed a good alternative. The should

Missing certificates and keys in the keychain while using Jenkins/Hudson as Continuous Integration for iOS and Mac development

怎甘沉沦 提交于 2019-12-17 02:59:59
问题 I'm trying to improve Hudson CI for iOS and start Hudson as soon as system starts up. To do this I'm using the following launchd script: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>Label</key> <string>Hudson CI</string> <key>ProgramArguments</key> <array> <string>/usr/bin/java</string> <string>-jar</string> <string>/Users/user/Hudson/hudson.war</string> </array>

Detect if running under launchd

倾然丶 夕夏残阳落幕 提交于 2019-12-13 02:29:33
问题 How do I detect that I'm running as a LaunchAgent under launchd on Mac OS X? This is for a program (written in Go) that needs to restart when told to do so. If it's been started from a terminal or init script, it needs to do this by itself. If running under a service manager it should not attempt to restart but simply exit and be restarted by the manager. For example, when running under Solaris SMF the environment variable SMF_FMRI is set, but I see nothing similar in launchd. There are

launching a user-context application by root-daemon on demand

若如初见. 提交于 2019-12-12 16:21:28
问题 I'm a noob to objective c and I have a daemon code that runs as root (system-wide application) and communicates with a server. Every once in a while, the server will command that root app to fire up an additional application that runs within the logged on user context (without interrupting the user - silently). I have the user context application written as well. What I'm lacking is the understanding on how my root daemon can launch the user context application. How can my daemon fire it up

launchd executes python script, but import fails

廉价感情. 提交于 2019-12-12 11:57:27
问题 I wrote a python script using appscript to track my currently active window. I am running it via launchd, but when I do that it can't import appscript. I have set the PYTHONPATH in the plist for launchd, but I think launchd is not reading .pth files in site-packages. Is there a way to make it do that? My script is here: https://github.com/katylava/macwintracker This is the launchd plist: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http

launch agent from daemon in user context

↘锁芯ラ 提交于 2019-12-12 08:15:20
问题 I have a launch daemon that runs in the login context of a Mac OSX 10.6 machine. I want to launch an agent for each user from that agent, and have the agent run in the user's login context. However, I need to control the precise arguments to the agent application very carefully, which is why I cannot use a launchd agent, like I have for the daemon. How can I create a process that runs in the context of the logged in user? I've trued seteuid and setuid calls, but these don't change the

Invalidate kextcache after removing driver launchd plist file

人走茶凉 提交于 2019-12-12 01:36:34
问题 I've created uninstaller for my driver, that remove its matching plist file from /Library/LaunchDaemons so that it won't be loaded again by launchd on the next boot cycle. However, it doesn't seems to take any effect on my driver that is still being loaded normally after booting the machine. After doing some research in this matter, I've found out that the kextcache is the reason for this behaviour, and in order clean/invalidate it, I need to touch the folder where the installation target

OSX: Syntax for loading a single launchagent for current user

ぃ、小莉子 提交于 2019-12-11 14:22:41
问题 I am trying to load a single user's LaunchAgent plist. All existing plist files in the directory have the permissions of the user and the user's default group, If I use those permissions for my plist file and try to load, I get $ sudo launchctl load -w -F $HOME/Library/LaunchAgents/com.ionic.python.ionic-fs-watcher.startup.plist /Users/timothy/Library/LaunchAgents/com.ionic.python.ionic-fs-watcher.startup.plist: Path had bad ownership/permissions If I set the permissions to root:wheel the

My mac osx launched plist won't run

僤鯓⒐⒋嵵緔 提交于 2019-12-11 11:41:49
问题 it looks like it loads but has a status of 1 when using launchctl list and using launchctl start ... it says No such Process... i have it saved in /Users/IMG/Library/LaunchAgents. The sh script runs fine. the logging doesn't show anything - no file created.. I am very new to plist so please forgive ignorance. <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>Label</key

Mac Daemon for ActiveMQ

泄露秘密 提交于 2019-12-11 07:56:08
问题 I have tried setting ActiveMQ daemon but have been unsuccessful so far. I can't seem to load ActiveMQ . Not sure what more can I do to make this work? I can start ActiveMQ by running command /Library/ActiveMQ/bin/macosx/activemq start In the plist <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>RunAtLoad</key> <true/> <key>KeepAlive</key> <true/> <key>Label<