{"action":"opened","issue":{"url":"https://api.github.com/repos/steveicarus/iverilog/issues/63","labels_url":"https://api.github.com/repos/steveicarus/iverilog/issues/63/labels{/name}","comments_url":"https://api.github.com/repos/steveicarus/iverilog/issues/63/comments","events_url":"https://api.github.com/repos/steveicarus/iverilog/issues/63/events","html_url":"https://github.com/steveicarus/iverilog/issues/63","id":72016507,"number":63,"title":"Pause Resume functionality.","user":{"login":"knightpraetor","id":9922396,"avatar_url":"https://avatars.githubusercontent.com/u/9922396?v=3","gravatar_id":"","url":"https://api.github.com/users/knightpraetor","html_url":"https://github.com/knightpraetor","followers_url":"https://api.github.com/users/knightpraetor/followers","following_url":"https://api.github.com/users/knightpraetor/following{/other_user}","gists_url":"https://api.github.com/users/knightpraetor/gists{/gist_id}","starred_url":"https://api.github.com/users/knightpraetor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/knightpraetor/subscriptions","organizations_url":"https://api.github.com/users/knightpraetor/orgs","repos_url":"https://api.github.com/users/knightpraetor/repos","events_url":"https://api.github.com/users/knightpraetor/events{/privacy}","received_events_url":"https://api.github.com/users/knightpraetor/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-04-29T23:26:48Z","updated_at":"2015-04-29T23:26:48Z","closed_at":null,"body":"I wanted to be able to pause and resume vvp.exe using ctrl c and the \"cont\" command. There is a ctrl c handler, to allow pausing, but it will break because it does not reattach the handler for SIGINT after the sigint is called.\r\n\r\nMy testing indicates that if I alter the function:\r\n\r\n\r\n * These are the signal handling infrastructure. The SIGINT signal\r\n * leads to an implicit $stop.\r\n */\r\nextern \"C\" void signals_handler(int)\r\n{\r\n      //reset signals handler so that program can be paused and resumed with ctrl + c and cont commands\r\n      signal(SIGINT, &signals_handler);\r\n      schedule_stopped_flag = true;\r\n}\r\n\r\nin schedule.cc, then the the signal handler gets reattached and can be used for resuming.\r\n\r\nIf there is a better way of doing this, feel free to let me know\r\n"}}