Skip to content

Commit

Permalink
Issue #3: Error handling in main for pthread_create
Browse files Browse the repository at this point in the history
  • Loading branch information
SteveWare committed May 5, 2016
1 parent 64f112b commit 5136de0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion replay/rdp_replay.C
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,11 @@ int main(int argc, char *const *argv)

pdelay.fullspeed() ; // Set pcap rate to fullspeed until we lock onto selected stream
pthread_t th ;
pthread_create(&th, 0, monitor_thread, 0) ;
if (pthread_create(&th, 0, monitor_thread, 0))
{
printf("Sorry, pthread_create failed. Aborting.\n") ;
exit(1) ;
}

(void)pcap_loop(ph, 0, pcap_delay::process, (u_char *)&pdelay) ;

Expand Down

0 comments on commit 5136de0

Please sign in to comment.