launchd

iPhone app crashes when launched from Xcode, but not from iPhone

流过昼夜 提交于 2020-01-01 05:55:09
问题 I have an app that is crashing on the iPhone, but only when it launched via Xcode. I can see in the iPhone console log that the app receives a memory warning, and then there are some strange events like these: Sun Jul 11 00:03:43 Matts-iPhone com.apple.launchd[1] (UIKitApplication:com.mycom.myapp[0x3f60][5591]) <Notice>: (UIKitApplication:com.mycom.myapp[0x3f60]) Bug: launchd_core_logic.c:3270 (24132):0 Sun Jul 11 00:03:43 Matts-iPhone com.apple.debugserver-48[5590] <Warning>: 1 [15d6/1403]:

How can I debug a Launchd script that doesn't run on startup?

回眸只為那壹抹淺笑 提交于 2020-01-01 03:59:06
问题 I have some Launchd scripts from homebrew. However I have to manually run them when I restart my computer: launchctl load -w ~/Library/LaunchAgents/com.mysql.mysqld.plist <?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>KeepAlive</key> <true/> <key>Label</key> <string>com.mysql.mysqld</string> <key>Program</key> <string>/Users/dash/.local/Cellar/mysql/5.1.49/bin

“hello world” launchd plist not working

坚强是说给别人听的谎言 提交于 2019-12-23 13:27:49
问题 I have the following plist file at ~/Library/LaunchAgents: <?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>com.yogapo.test_launchd</string> <key>Program</key> <string>. /Users/luke/dev/data_yogapo/script/test_launchd.sh</string> <key>StartInterval</key> <integer>10</integer> <key>RunAtLoad</key> <true/> </dict> </plist> And the test_launchd.sh

Run daemon as another user on mac os x

折月煮酒 提交于 2019-12-22 10:53:58
问题 I'm trying right now to create separate user for jenkins on Mac Os and run it with this user. I've created a new user: # Create the group sudo dscl . create /Groups/jenkins sudo dscl . create /Groups/jenkins PrimaryGroupID 300 # Create the user sudo dscl . create /Users/jenkins sudo dscl . create /Users/jenkins PrimaryGroupID 300 sudo dscl . create /Users/jenkins UniqueID 300 sudo dscl . create /Users/jenkins UserShell /bin/bash # Set the users pasword sudo dscl . passwd /Users/jenkins

How can I make a program start up automatically in OSX?

我只是一个虾纸丫 提交于 2019-12-21 14:21:27
问题 I have a little program that I want to make open automatically when my mac is started up. Because this program accepts command line arguments, its not as simple as just going to System Prefs/Accounts/Login items and adding it there... From google, I read that I can create a .profile file in my user's home folder, and that will execute whatever I put in it... So I have a .profile page in ~ like this: -rw-r--r--@ 1 matt staff 27 27 Sep 13:36 .profile That contains this... /Applications/mousefix

Is it possible to detect Power Nap / DarkWake mode in OSX

孤街浪徒 提交于 2019-12-21 12:39:25
问题 I have a daemon process started via launchd. This will be running even during DarkWake and has no time to finish before OS X goes back to sleep again. I can think of the following solutions, but didn't find a way to achieve this. Don't make this daemon process run during DarkWake. I went through Apple documentation and forums but didn't find any reference for this. During DarkWake via daemon process make the OS wait until its done. Tried with calling pmset noidle and caffeinate in daemon

Run a shell script periodically on Mac OS X without root permission

烂漫一生 提交于 2019-12-21 04:06:05
问题 I want to start up a file with .sh type or .py on mac os x without using root , I searched in google and found launchctl can help me , so i read tutorial and do same in tutorial but it not work for me , [i using mac os x 10.9 x64] My .plist file [run 1.sh file in every 60second] : <?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>com.alvin

Bash – How should I idle until I get a signal?

十年热恋 提交于 2019-12-21 03:59:16
问题 I have a script for launchd to run that starts a server, then tells it to exit gracefully when launchd kills it off (which should be at shutdown). My question: what is the appropriate, idiomatic way to tell the script to idle until it gets the signal? Should I just use a while-true-sleep-1 loop, or is there a better way to do this? #!/bin/bash cd "`dirname "$0"`" trap "./serverctl stop" TERM ./serverctl start # wait to receive TERM signal. 回答1: A plain wait would be significantly less

setenv variable with spaces in launchd.conf?

浪尽此生 提交于 2019-12-18 15:16:35
问题 I'm a Linux user that just recently got a mac. I'm trying to set up my IDE and found out that Macs don't use .bashrc / .bash_profile / etc. for GUI apps. So, if you have a GUI app that needs an environment variable, you're apparently supposed to do it in /etc/launchd.conf The thing is, this file uses csh style setenv syntax ("setenv key value" instead of "export key='value'") so now that I have a variable that has a space in it, I don't know what to do. Nothing is working. This is what I've

Running Python Script with Launchd: imports not found

独自空忆成欢 提交于 2019-12-18 07:08:26
问题 I've been trying to set up a script to run a python program at regular intervals using launchd . The python program fails because it can't find my imports---I know this because I caught the errors in a log file. To fix this problem, I created ~\.MacOSX\environment.plist , and duplicated my PYTHONPATH there, logged out and logged in again. This seems to be insufficient to solve the problem, and I'm at a loss as to what else to try. I'm running OSX, 10.8.3. Related threads: launchd executes