Keep command line tool alive

前端 未结 2 416
长情又很酷
长情又很酷 2020-12-09 10:51

How would a keep a command-line tool running for ever.

This is my code:

#import 

int main (int argc, const char * arg         


        
相关标签:
2条回答
  • In Swift 4,

    RunLoop.current.run()
    

    Cheers.

    0 讨论(0)
  • 2020-12-09 11:32

    You need to enter into a runloop using either CFRunLoop or NSRunLoop.

    Try:

    [[NSRunLoop currentRunLoop] run];
    
    0 讨论(0)
提交回复
热议问题