Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(84)

Side by Side Diff: util/mac/service_management.h

Issue 579083003: Revert "Drop 10.5 support: use ServiceManagement.framework directly." (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: Use an autorelease pool in the CFPropertyToLaunchData() implementation Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « util/mac/launchd_test.mm ('k') | util/mac/service_management.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Crashpad Authors. All rights reserved. 1 // Copyright 2014 The Crashpad Authors. All rights reserved.
2 // 2 //
3 // Licensed under the Apache License, Version 2.0 (the "License"); 3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License. 4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at 5 // You may obtain a copy of the License at
6 // 6 //
7 // http://www.apache.org/licenses/LICENSE-2.0 7 // http://www.apache.org/licenses/LICENSE-2.0
8 // 8 //
9 // Unless required by applicable law or agreed to in writing, software 9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS, 10 // distributed under the License is distributed on an "AS IS" BASIS,
(...skipping 23 matching lines...) Expand all
34 bool ServiceManagementSubmitJob(CFDictionaryRef job_cf); 34 bool ServiceManagementSubmitJob(CFDictionaryRef job_cf);
35 35
36 //! \brief Removes a job from the user launchd domain as in `SMJobRemove()`. 36 //! \brief Removes a job from the user launchd domain as in `SMJobRemove()`.
37 //! 37 //!
38 //! \param[in] label The label for the job to remove. 38 //! \param[in] label The label for the job to remove.
39 //! \param[in] wait `true` if this function should block, waiting for the job to 39 //! \param[in] wait `true` if this function should block, waiting for the job to
40 //! be removed. `false` if the job may be removed asynchronously. 40 //! be removed. `false` if the job may be removed asynchronously.
41 //! 41 //!
42 //! \return `true` if the job was removed successfully or if an asynchronous 42 //! \return `true` if the job was removed successfully or if an asynchronous
43 //! attempt to remove the job was started successfully, otherwise `false`. 43 //! attempt to remove the job was started successfully, otherwise `false`.
44 //! Unlike previous systems, on Mac OS X 10.10, this function returns `true`
45 //! even if \a label names a job that does not exist. This is filed as radar
46 //! 18268941.
47 //! 44 //!
48 //! \note This function is provided because `SMJobRemove()` is deprecated in Mac 45 //! \note This function is provided because `SMJobRemove()` is deprecated in Mac
49 //! OS X 10.10. It may or may not be implemented using `SMJobRemove()` from 46 //! OS X 10.10. On Mac OS X 10.10, observed in DP8 14A361c, it also blocks
50 //! `ServiceManagement.framework`. 47 //! for far too long (`_block_until_job_exits()` contains a one-second
48 //! `sleep()`, filed as radar 18398683) and does not signal failure via its
49 //! return value when asked to remove a nonexistent job (filed as radar
50 //! 18268941).
51 bool ServiceManagementRemoveJob(const std::string& label, bool wait); 51 bool ServiceManagementRemoveJob(const std::string& label, bool wait);
52 52
53 //! \brief Determines whether a specified job is loaded in the user launchd 53 //! \brief Determines whether a specified job is loaded in the user launchd
54 //! domain. 54 //! domain.
55 //! 55 //!
56 //! \param[in] label The label for the job to look up. 56 //! \param[in] label The label for the job to look up.
57 //! 57 //!
58 //! \return `true` if the job is loaded, otherwise `false`. 58 //! \return `true` if the job is loaded, otherwise `false`.
59 //! 59 //!
60 //! \note A loaded job is not necessarily presently running, nor has it 60 //! \note A loaded job is not necessarily presently running, nor has it
(...skipping 11 matching lines...) Expand all
72 //! \return The job’s process ID if running, otherwise `0`. 72 //! \return The job’s process ID if running, otherwise `0`.
73 //! 73 //!
74 //! \note This function is provided because `SMJobCopyDictionary()` is 74 //! \note This function is provided because `SMJobCopyDictionary()` is
75 //! deprecated in Mac OS X 10.10. It may or may not be implemented using 75 //! deprecated in Mac OS X 10.10. It may or may not be implemented using
76 //! `SMJobCopyDictionary()` from `ServiceManagement.framework`. 76 //! `SMJobCopyDictionary()` from `ServiceManagement.framework`.
77 pid_t ServiceManagementIsJobRunning(const std::string& label); 77 pid_t ServiceManagementIsJobRunning(const std::string& label);
78 78
79 } // namespace crashpad 79 } // namespace crashpad
80 80
81 #endif // CRASHPAD_UTIL_MAC_SERVICE_MANAGEMENT 81 #endif // CRASHPAD_UTIL_MAC_SERVICE_MANAGEMENT
OLDNEW
« no previous file with comments | « util/mac/launchd_test.mm ('k') | util/mac/service_management.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698