Keep command line tool alive

前端 未结 2 415
长情又很酷
长情又很酷 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条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-09 11:32

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

    Try:

    [[NSRunLoop currentRunLoop] run];
    

提交回复
热议问题