generating wrappers..
/Users/jojo/mysite-workingcopy/.git/hooks/post-commit.c:116:7: warning: 'daemon' is deprecated: first deprecated in macOS 10.5 - Use posix_spawn APIs instead. [-Wdeprecated-declarations]
if (daemon(1, 0) == 0) {
^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stdlib.h:299:6: note: 'daemon' has been explicitly marked deprecated here
int daemon(int, int) __DARWIN_1050(daemon) __OSX_AVAILABLE_BUT_DEPRECATED_MSG(__MAC_10_0, __MAC_10_5, __IPHONE_2_0, __IPHONE_2_0, "Use posix_spawn APIs instead.") __WATCHOS_PROHIBITED __TVOS_PROHIBITED;
^
1 warning generated.
How can I fix this?
Are you trying to use the configuration options
git_wrapped_backround_command
orwrapper_background_command
? Those are what are triggering the warning. If you don't need those features, disable them in your setup file to silence the warning.If you do want them, can you ignore the warnings for now? What are you using them for -- perhaps we can find an alternative way of achieving the same thing.
More detail:
This is the code triggering the warning: http://source.ikiwiki.branchable.com/?p=source.git;a=blob;f=IkiWiki/Wrapper.pm;h=1b8c558e5a46ae55aa14be4f09e59ef5ad5a504b;hb=HEAD#l283
If a background command is specified, then this code is generated and run. It uses function
daemon
(from 4.4BSD in 1995, added to glibc at the same time, not part of POSIX) and it seems Apple are going to remove it from a future macOS.We would have to look into whether their suggested remedy (use
posix_spawn
instead, or maybe we couldfork/exec
) would be appropriate for all the hosts/operating systems that IkiWiki might be run on.