[asterisk-commits] dlee: branch dlee/ASTERISK-194630-startup-deadlock r398366 - /team/dlee/ASTER...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Sep 4 23:06:33 CDT 2013


Author: dlee
Date: Wed Sep  4 23:06:31 2013
New Revision: 398366

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=398366
Log:
Try to kill it

Modified:
    team/dlee/ASTERISK-194630-startup-deadlock/main/asterisk.c

Modified: team/dlee/ASTERISK-194630-startup-deadlock/main/asterisk.c
URL: http://svnview.digium.com/svn/asterisk/team/dlee/ASTERISK-194630-startup-deadlock/main/asterisk.c?view=diff&rev=398366&r1=398365&r2=398366
==============================================================================
--- team/dlee/ASTERISK-194630-startup-deadlock/main/asterisk.c (original)
+++ team/dlee/ASTERISK-194630-startup-deadlock/main/asterisk.c Wed Sep  4 23:06:31 2013
@@ -3359,6 +3359,13 @@
 	ast_cli_unregister_multiple(cli_asterisk, ARRAY_LEN(cli_asterisk));
 }
 
+static void *fake_thread(void *p)
+{
+	long int x = (long int) p;
+	printf("Fake thread %ld\n", x);
+	return NULL;
+}
+
 int main(int argc, char *argv[])
 {
 	int c;
@@ -3376,6 +3383,8 @@
 	char *remotesock = NULL;
 	int moduleresult;         /*!< Result from the module load subsystem */
 	struct rlimit l;
+
+	long v;
 
 	/* Remember original args for restart */
 	if (argc > ARRAY_LEN(_argv) - 1) {
@@ -3834,6 +3843,11 @@
 	printf("%s", term_end());
 	fflush(stdout);
 
+	for (v = 0; v < 20; ++v) {
+		pthread_t th;
+		ast_pthread_create_detached(&th, NULL, fake_thread, (void*)v);
+	}
+
 	print_intro_message(runuser, rungroup);
 
 	if (ast_opt_console && !option_verbose) {




More information about the asterisk-commits mailing list