Changeset 03333bc in mainline for uspace/srv/taskmon/taskmon.c
- Timestamp:
- 2010-01-23T20:08:50Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- bc310a05
- Parents:
- a074b4f
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/taskmon/taskmon.c
ra074b4f r03333bc 48 48 static void fault_event(ipc_callid_t callid, ipc_call_t *call) 49 49 { 50 char *argv[ 5];50 char *argv[11]; 51 51 char *fname; 52 char *dump_fname; 52 53 char *s_taskid; 54 char **s; 53 55 54 56 task_id_t taskid; … … 63 65 } 64 66 67 if (asprintf(&dump_fname, "/scratch/d%lld.txt", taskid) < 0) { 68 printf("Memory allocation failed.\n"); 69 return; 70 } 71 65 72 printf(NAME ": Task %lld fault in thread 0x%lx.\n", taskid, thread); 66 73 67 argv[0] = fname = "/app/taskdump"; 74 argv[0] = fname = "/app/redir"; 75 argv[1] = "-i"; 76 argv[2] = "/readme"; 77 argv[3] = "-o"; 78 argv[4] = dump_fname; 79 argv[5] = "--"; 68 80 69 81 #ifdef CONFIG_VERBOSE_DUMPS 70 argv[1] = "-m"; 71 argv[2] = "-t"; 72 argv[3] = s_taskid; 73 argv[4] = NULL; 74 75 printf(NAME ": Executing %s %s %s %s\n", argv[0], argv[1], argv[2], 76 argv[3]); 82 argv[6] = "/app/taskdump"; 83 argv[7] = "-m"; 84 argv[8] = "-t"; 85 argv[9] = s_taskid; 86 argv[10] = NULL; 77 87 #else 78 argv[1] = "-t"; 79 argv[2] = s_taskid; 80 argv[3] = NULL; 81 82 printf(NAME ": Executing %s %s %s\n", argv[0], argv[1], argv[2]); 88 argv[6] = "/app/taskdump"; 89 argv[7] = "-t"; 90 argv[8] = s_taskid; 91 argv[9] = NULL; 83 92 #endif 93 printf(NAME ": Executing"); 94 s = argv; 95 while (*s != NULL) { 96 printf(" %s", *s); 97 ++s; 98 } 99 putchar('\n'); 84 100 85 101 if (!task_spawn(fname, argv))
Note:
See TracChangeset
for help on using the changeset viewer.