Post

Replies

Boosts

Views

Activity

Reply to FileHandle's readabilityHandler not called when detached from debugger
@eskimo Sorry to ressurect an old thread. I was just faced with this very issue trying to run a shell script using Process(). My program was waiting 10 seconds for enough data to fill the buffer before the 1 second updates from the script were presented to my read handler. On reading man setbuf, I saw a reference to setting the environment variable STDBUF. Inserting export STDBUF="U" into the script seems to have solved the problem and my program now receives each message as it is output from the shell script. I was unable to find reference to this environment variable anywhere else and am just asking for reassurance that it won't suddenly disappear.
Topic: App & System Services SubTopic: General Tags:
May ’23
Reply to Windows Developer moving to macOS – please help me to start
Instead of looking to call Swift from C++ you should probably look at it the other way round. Use Swift as the main language for your development - it integrates beautifully with Interface Builder and is ideally suited for building a gui. You can then make calls to C/C++/Obj-C using the Swift bridging interfaces. Admittedly there is a bit to learn but I think you'll find Swift to be quite easy to become familiar with. I have found C/C++ to be very useful in Swift applications for dealing with Posix/System interfaces, then passing results back to Swift either as arguments or via closure/callbacks.
Topic: App & System Services SubTopic: Core OS Tags:
Sep ’22
Reply to How to assign more ram(memory) to copy/move function.
I am pretty sure the limiting factor here is not the RAM allocated to the copy/move process but instead the speed of your devices. What is the transfer rate of your source device? What is the transfer rate of the target? Are you using USB? Are these SSD devices? Is it a network connecton? All of these have for more impact than the amount of memry allocated to the process.
Topic: App & System Services SubTopic: Core OS Tags:
Jan ’22
Reply to FileHandle's readabilityHandler not called when detached from debugger
@eskimo Sorry to ressurect an old thread. I was just faced with this very issue trying to run a shell script using Process(). My program was waiting 10 seconds for enough data to fill the buffer before the 1 second updates from the script were presented to my read handler. On reading man setbuf, I saw a reference to setting the environment variable STDBUF. Inserting export STDBUF="U" into the script seems to have solved the problem and my program now receives each message as it is output from the shell script. I was unable to find reference to this environment variable anywhere else and am just asking for reassurance that it won't suddenly disappear.
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
May ’23
Reply to Windows Developer moving to macOS – please help me to start
Instead of looking to call Swift from C++ you should probably look at it the other way round. Use Swift as the main language for your development - it integrates beautifully with Interface Builder and is ideally suited for building a gui. You can then make calls to C/C++/Obj-C using the Swift bridging interfaces. Admittedly there is a bit to learn but I think you'll find Swift to be quite easy to become familiar with. I have found C/C++ to be very useful in Swift applications for dealing with Posix/System interfaces, then passing results back to Swift either as arguments or via closure/callbacks.
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Sep ’22
Reply to dns_parse_packet API not working
I have a suspicion that this problem is related to the libresolv security patches applied in https://support.apple.com/en-us/HT213257 and https://support.apple.com/en-us/HT213256 to macOS. Presumably this same libresolv security fix was also applied to iOS.
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
May ’22
Reply to How to assign more ram(memory) to copy/move function.
I am pretty sure the limiting factor here is not the RAM allocated to the copy/move process but instead the speed of your devices. What is the transfer rate of your source device? What is the transfer rate of the target? Are you using USB? Are these SSD devices? Is it a network connecton? All of these have for more impact than the amount of memry allocated to the process.
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Jan ’22