File: group__group__funcmacro__procctrl.html

package info (click to toggle)
wxpython3.0 3.0.2.0%2Bdfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 482,760 kB
  • ctags: 518,293
  • sloc: cpp: 2,127,226; python: 294,045; makefile: 51,942; ansic: 19,033; sh: 3,013; xml: 1,629; perl: 17
file content (604 lines) | stat: -rw-r--r-- 52,619 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>wxWidgets: Process Control</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="extra_stylesheet.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="page_container">
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0" style="width: 100%;">
 <tbody>
 <tr>
  <td id="projectlogo">
    <a href="http://www.wxwidgets.org/" target="_new">
      <img alt="wxWidgets" src="logo.png"/>
    </a>
  </td>
  <td style="padding-left: 0.5em; text-align: right;">
   <span id="projectnumber">Version: 3.0.2</span>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- Generated by Doxygen 1.8.2 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Categories</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#enum-members">Enumerations</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">Process Control</div>  </div>
<div class="ingroups"><a class="el" href="group__group__funcmacro.html">Functions and Macros by Category</a></div></div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<p>The functions in this section are used to launch or terminate the other processes. </p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Classes</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structwx_execute_env.html">wxExecuteEnv</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">This structure can optionally be passed to <a class="el" href="group__group__funcmacro__procctrl.html#gaa276e9e676e26bafeec3141b73399b33" title="Executes another program in Unix or Windows.">wxExecute()</a> to specify additional options to use for the child process.  <a href="structwx_execute_env.html#details">More...</a><br/></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a>
Enumerations</h2></td></tr>
<tr class="memitem:gaedcf2109f459315e1a7f2af73ec9b603"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom">{ <br/>
&#160;&#160;<a class="el" href="group__group__funcmacro__procctrl.html#ggaedcf2109f459315e1a7f2af73ec9b603a457bddfa2a7ce4927358680893910cc8">wxEXEC_ASYNC</a> = 0, 
<br/>
&#160;&#160;<a class="el" href="group__group__funcmacro__procctrl.html#ggaedcf2109f459315e1a7f2af73ec9b603a412f75e022e82e7d8415109a6712be36">wxEXEC_SYNC</a> = 1, 
<br/>
&#160;&#160;<a class="el" href="group__group__funcmacro__procctrl.html#ggaedcf2109f459315e1a7f2af73ec9b603a433c517e46d1dd61a5dda1ffeb750552">wxEXEC_SHOW_CONSOLE</a> = 2, 
<br/>
&#160;&#160;<a class="el" href="group__group__funcmacro__procctrl.html#ggaedcf2109f459315e1a7f2af73ec9b603afd7547e6ac65800275cdffc7be65fd74">wxEXEC_MAKE_GROUP_LEADER</a> = 4, 
<br/>
&#160;&#160;<a class="el" href="group__group__funcmacro__procctrl.html#ggaedcf2109f459315e1a7f2af73ec9b603a8d51ac2386c10f6f5eb7c7a0704addb1">wxEXEC_NODISABLE</a> = 8, 
<br/>
&#160;&#160;<a class="el" href="group__group__funcmacro__procctrl.html#ggaedcf2109f459315e1a7f2af73ec9b603a00bae6530ff099a5ead1c80f81d5a5c9">wxEXEC_NOEVENTS</a> = 16, 
<br/>
&#160;&#160;<a class="el" href="group__group__funcmacro__procctrl.html#ggaedcf2109f459315e1a7f2af73ec9b603a6eb92c81a5e49ef172b9d74528be55a0">wxEXEC_HIDE_CONSOLE</a> = 32, 
<br/>
&#160;&#160;<a class="el" href="group__group__funcmacro__procctrl.html#ggaedcf2109f459315e1a7f2af73ec9b603a81dbb296e5efdd73668a1570e7af5716">wxEXEC_BLOCK</a> = wxEXEC_SYNC | wxEXEC_NOEVENTS
<br/>
 }</td></tr>
<tr class="memdesc:gaedcf2109f459315e1a7f2af73ec9b603"><td class="mdescLeft">&#160;</td><td class="mdescRight">Bit flags that can be used with <a class="el" href="group__group__funcmacro__procctrl.html#gaa276e9e676e26bafeec3141b73399b33" title="Executes another program in Unix or Windows.">wxExecute()</a>.  <a href="group__group__funcmacro__procctrl.html#gaedcf2109f459315e1a7f2af73ec9b603">More...</a><br/></td></tr>
<tr class="separator:gaedcf2109f459315e1a7f2af73ec9b603"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga3770f7ff142dab558f10ae354350874d"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__funcmacro__procctrl.html#ga3770f7ff142dab558f10ae354350874d">wxExit</a> ()</td></tr>
<tr class="memdesc:ga3770f7ff142dab558f10ae354350874d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Exits application after calling <a class="el" href="classwx_app_console.html#a5ee60051c92b0b2933258799626a0485" title="Override this member function for any processing which needs to be done as the application is about t...">wxApp::OnExit</a>.  <a href="#ga3770f7ff142dab558f10ae354350874d"></a><br/></td></tr>
<tr class="separator:ga3770f7ff142dab558f10ae354350874d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaa276e9e676e26bafeec3141b73399b33"><td class="memItemLeft" align="right" valign="top">long&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__funcmacro__procctrl.html#gaa276e9e676e26bafeec3141b73399b33">wxExecute</a> (const <a class="el" href="classwx_string.html">wxString</a> &amp;command, int flags=<a class="el" href="group__group__funcmacro__procctrl.html#ggaedcf2109f459315e1a7f2af73ec9b603a457bddfa2a7ce4927358680893910cc8">wxEXEC_ASYNC</a>, <a class="el" href="classwx_process.html">wxProcess</a> *callback=NULL, const <a class="el" href="structwx_execute_env.html">wxExecuteEnv</a> *env=NULL)</td></tr>
<tr class="memdesc:gaa276e9e676e26bafeec3141b73399b33"><td class="mdescLeft">&#160;</td><td class="mdescRight">Executes another program in Unix or Windows.  <a href="#gaa276e9e676e26bafeec3141b73399b33"></a><br/></td></tr>
<tr class="separator:gaa276e9e676e26bafeec3141b73399b33"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga8116ca17aec4eea74b848f1544805960"><td class="memItemLeft" align="right" valign="top">long&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__funcmacro__procctrl.html#ga8116ca17aec4eea74b848f1544805960">wxExecute</a> (char **argv, int flags=<a class="el" href="group__group__funcmacro__procctrl.html#ggaedcf2109f459315e1a7f2af73ec9b603a457bddfa2a7ce4927358680893910cc8">wxEXEC_ASYNC</a>, <a class="el" href="classwx_process.html">wxProcess</a> *callback=NULL, const <a class="el" href="structwx_execute_env.html">wxExecuteEnv</a> *env=NULL)</td></tr>
<tr class="memdesc:ga8116ca17aec4eea74b848f1544805960"><td class="mdescLeft">&#160;</td><td class="mdescRight">This is an overloaded version of wxExecute(const wxString&amp;,int,wxProcess*), please see its documentation for general information.  <a href="#ga8116ca17aec4eea74b848f1544805960"></a><br/></td></tr>
<tr class="separator:ga8116ca17aec4eea74b848f1544805960"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gabba679a024d6a4a084fc8d16220c4d7b"><td class="memItemLeft" align="right" valign="top">long&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__funcmacro__procctrl.html#gabba679a024d6a4a084fc8d16220c4d7b">wxExecute</a> (wchar_t **argv, int flags=<a class="el" href="group__group__funcmacro__procctrl.html#ggaedcf2109f459315e1a7f2af73ec9b603a457bddfa2a7ce4927358680893910cc8">wxEXEC_ASYNC</a>, <a class="el" href="classwx_process.html">wxProcess</a> *callback=NULL, const <a class="el" href="structwx_execute_env.html">wxExecuteEnv</a> *env=NULL)</td></tr>
<tr class="separator:gabba679a024d6a4a084fc8d16220c4d7b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga8f0c6749817ce450eae22290194c812e"><td class="memItemLeft" align="right" valign="top">long&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__funcmacro__procctrl.html#ga8f0c6749817ce450eae22290194c812e">wxExecute</a> (const <a class="el" href="classwx_string.html">wxString</a> &amp;command, <a class="el" href="classwx_array_string.html">wxArrayString</a> &amp;output, int flags=0, const <a class="el" href="structwx_execute_env.html">wxExecuteEnv</a> *env=NULL)</td></tr>
<tr class="memdesc:ga8f0c6749817ce450eae22290194c812e"><td class="mdescLeft">&#160;</td><td class="mdescRight">This is an overloaded version of wxExecute(const wxString&amp;,int,wxProcess*), please see its documentation for general information.  <a href="#ga8f0c6749817ce450eae22290194c812e"></a><br/></td></tr>
<tr class="separator:ga8f0c6749817ce450eae22290194c812e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga481a6f4eb3783d38e022aaca1b6ed757"><td class="memItemLeft" align="right" valign="top">long&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__funcmacro__procctrl.html#ga481a6f4eb3783d38e022aaca1b6ed757">wxExecute</a> (const <a class="el" href="classwx_string.html">wxString</a> &amp;command, <a class="el" href="classwx_array_string.html">wxArrayString</a> &amp;output, <a class="el" href="classwx_array_string.html">wxArrayString</a> &amp;errors, int flags=0, const <a class="el" href="structwx_execute_env.html">wxExecuteEnv</a> *env=NULL)</td></tr>
<tr class="memdesc:ga481a6f4eb3783d38e022aaca1b6ed757"><td class="mdescLeft">&#160;</td><td class="mdescRight">This is an overloaded version of wxExecute(const wxString&amp;,int,wxProcess*), please see its documentation for general information.  <a href="#ga481a6f4eb3783d38e022aaca1b6ed757"></a><br/></td></tr>
<tr class="separator:ga481a6f4eb3783d38e022aaca1b6ed757"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gab50b6a7e83f7a59d4c1d08d52505f8c6"><td class="memItemLeft" align="right" valign="top">unsigned long&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__funcmacro__procctrl.html#gab50b6a7e83f7a59d4c1d08d52505f8c6">wxGetProcessId</a> ()</td></tr>
<tr class="memdesc:gab50b6a7e83f7a59d4c1d08d52505f8c6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the number uniquely identifying the current process in the system.  <a href="#gab50b6a7e83f7a59d4c1d08d52505f8c6"></a><br/></td></tr>
<tr class="separator:gab50b6a7e83f7a59d4c1d08d52505f8c6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gae3a7de5a29e70c77463dd1bc38fb98cf"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__funcmacro__procctrl.html#gae3a7de5a29e70c77463dd1bc38fb98cf">wxKill</a> (long pid, <a class="el" href="utils_8h.html#a20679c5ff68fdf39b9ea552b0d94c314">wxSignal</a> sig=<a class="el" href="utils_8h.html#a20679c5ff68fdf39b9ea552b0d94c314ae53272781ce284433c1aed7d4457b951">wxSIGTERM</a>, <a class="el" href="utils_8h.html#af9655b6ab587e0a65ad6f63eb32d814f">wxKillError</a> *rc=NULL, int flags=<a class="el" href="utils_8h.html#a03a0fc5862f90668a6d4cf968445b272a6daac111081c4e551647bd00c898c42c">wxKILL_NOCHILDREN</a>)</td></tr>
<tr class="memdesc:gae3a7de5a29e70c77463dd1bc38fb98cf"><td class="mdescLeft">&#160;</td><td class="mdescRight">Equivalent to the Unix kill function: send the given signal <em>sig</em> to the process with PID <em>pid</em>.  <a href="#gae3a7de5a29e70c77463dd1bc38fb98cf"></a><br/></td></tr>
<tr class="separator:gae3a7de5a29e70c77463dd1bc38fb98cf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gad7f2f357f592f8c786ab05f516578023"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__funcmacro__procctrl.html#gad7f2f357f592f8c786ab05f516578023">wxShell</a> (const <a class="el" href="classwx_string.html">wxString</a> &amp;command=<a class="el" href="interface_2wx_2string_8h.html#a9a321d587166a30017b608dd2d234033">wxEmptyString</a>)</td></tr>
<tr class="memdesc:gad7f2f357f592f8c786ab05f516578023"><td class="mdescLeft">&#160;</td><td class="mdescRight">Executes a command in an interactive shell window.  <a href="#gad7f2f357f592f8c786ab05f516578023"></a><br/></td></tr>
<tr class="separator:gad7f2f357f592f8c786ab05f516578023"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga3177c2a68564921806525f8fefa7e5c8"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__funcmacro__procctrl.html#ga3177c2a68564921806525f8fefa7e5c8">wxShutdown</a> (int flags=<a class="el" href="utils_8h.html#abacc7b19c541b5353890c078f734d291a6e11ecb7aca7a0d1c19a83ac87693a25">wxSHUTDOWN_POWEROFF</a>)</td></tr>
<tr class="memdesc:ga3177c2a68564921806525f8fefa7e5c8"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function shuts down or reboots the computer depending on the value of the <em>flags</em>.  <a href="#ga3177c2a68564921806525f8fefa7e5c8"></a><br/></td></tr>
<tr class="separator:ga3177c2a68564921806525f8fefa7e5c8"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Enumeration Type Documentation</h2>
<a class="anchor" id="gaedcf2109f459315e1a7f2af73ec9b603"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">anonymous enum</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Bit flags that can be used with <a class="el" href="group__group__funcmacro__procctrl.html#gaa276e9e676e26bafeec3141b73399b33" title="Executes another program in Unix or Windows.">wxExecute()</a>. </p>
<dl><dt><b>Enumerator: </b></dt><dd><table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><em><a class="anchor" id="ggaedcf2109f459315e1a7f2af73ec9b603a457bddfa2a7ce4927358680893910cc8"></a>wxEXEC_ASYNC</em>&nbsp;</td><td>
<p>Execute the process asynchronously. </p>
<p>Notice that, due to its value, this is the default. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="ggaedcf2109f459315e1a7f2af73ec9b603a412f75e022e82e7d8415109a6712be36"></a>wxEXEC_SYNC</em>&nbsp;</td><td>
<p>Execute the process synchronously. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="ggaedcf2109f459315e1a7f2af73ec9b603a433c517e46d1dd61a5dda1ffeb750552"></a>wxEXEC_SHOW_CONSOLE</em>&nbsp;</td><td>
<p>Always show the child process console under MSW. </p>
<p>The child console is hidden by default if the child IO is redirected, this flag allows to change this and show it nevertheless.</p>
<p>This flag is ignored under the other platforms. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="ggaedcf2109f459315e1a7f2af73ec9b603afd7547e6ac65800275cdffc7be65fd74"></a>wxEXEC_MAKE_GROUP_LEADER</em>&nbsp;</td><td>
<p>Make the new process a group leader. </p>
<p>Under Unix, if the process is the group leader then passing wxKILL_CHILDREN to <a class="el" href="group__group__funcmacro__procctrl.html#gae3a7de5a29e70c77463dd1bc38fb98cf" title="Equivalent to the Unix kill function: send the given signal sig to the process with PID pid...">wxKill()</a> kills all children as well as pid.</p>
<p>Under MSW, applies only to console applications and is only supported under NT family (i.e. not under Windows 9x). It corresponds to the native <code>CREATE_NEW_PROCESS_GROUP</code> and, in particular, ensures that Ctrl-Break signals will be sent to all children of this process as well to the process itself. Support for this flag under MSW was added in version 2.9.4 of wxWidgets. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="ggaedcf2109f459315e1a7f2af73ec9b603a8d51ac2386c10f6f5eb7c7a0704addb1"></a>wxEXEC_NODISABLE</em>&nbsp;</td><td>
<p>Don't disable the program UI while running the child synchronously. </p>
<p>By default synchronous execution disables all program windows to avoid that the user interacts with the program while the child process is running, you can use this flag to prevent this from happening.</p>
<p>This flag can only be used with <a class="el" href="group__group__funcmacro__procctrl.html#ggaedcf2109f459315e1a7f2af73ec9b603a412f75e022e82e7d8415109a6712be36" title="Execute the process synchronously.">wxEXEC_SYNC</a>. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="ggaedcf2109f459315e1a7f2af73ec9b603a00bae6530ff099a5ead1c80f81d5a5c9"></a>wxEXEC_NOEVENTS</em>&nbsp;</td><td>
<p>Don't dispatch events while the child process is executed. </p>
<p>By default, the event loop is run while waiting for synchronous execution to complete and this flag can be used to simply block the main process until the child process finishes</p>
<p>This flag can only be used with <a class="el" href="group__group__funcmacro__procctrl.html#ggaedcf2109f459315e1a7f2af73ec9b603a412f75e022e82e7d8415109a6712be36" title="Execute the process synchronously.">wxEXEC_SYNC</a>. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="ggaedcf2109f459315e1a7f2af73ec9b603a6eb92c81a5e49ef172b9d74528be55a0"></a>wxEXEC_HIDE_CONSOLE</em>&nbsp;</td><td>
<p>Hide child process console under MSW. </p>
<p>Under MSW, hide the console of the child process if it has one, even if its IO is not redirected.</p>
<p>This flag is ignored under the other platforms. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="ggaedcf2109f459315e1a7f2af73ec9b603a81dbb296e5efdd73668a1570e7af5716"></a>wxEXEC_BLOCK</em>&nbsp;</td><td>
<p>Convenient synonym for flags given system()-like behaviour. </p>
</td></tr>
</table>
</dd>
</dl>

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="gaa276e9e676e26bafeec3141b73399b33"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">long wxExecute </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classwx_string.html">wxString</a> &amp;&#160;</td>
          <td class="paramname"><em>command</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>flags</em> = <code><a class="el" href="group__group__funcmacro__procctrl.html#ggaedcf2109f459315e1a7f2af73ec9b603a457bddfa2a7ce4927358680893910cc8">wxEXEC_ASYNC</a></code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classwx_process.html">wxProcess</a> *&#160;</td>
          <td class="paramname"><em>callback</em> = <code>NULL</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structwx_execute_env.html">wxExecuteEnv</a> *&#160;</td>
          <td class="paramname"><em>env</em> = <code>NULL</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Executes another program in Unix or Windows. </p>
<p>In the overloaded versions of this function, if <em>flags</em> parameter contains <code>wxEXEC_ASYNC</code> flag (the default), flow of control immediately returns. If it contains <code>wxEXEC_SYNC</code>, the current application waits until the other program has terminated.</p>
<p>In the case of synchronous execution, the return value is the exit code of the process (which terminates by the moment the function returns) and will be -1 if the process couldn't be started and typically 0 if the process terminated successfully. Also, while waiting for the process to terminate, <a class="el" href="group__group__funcmacro__procctrl.html#gaa276e9e676e26bafeec3141b73399b33" title="Executes another program in Unix or Windows.">wxExecute()</a> will call <a class="el" href="group__group__funcmacro__appinitterm.html#gac386c89a04e364afc07edce6d848c27a" title="Calls wxAppConsole::Yield.">wxYield()</a>. Because of this, by default this function disables all application windows to avoid unexpected reentrancies which could result from the users interaction with the program while the child process is running. If you are sure that it is safe to not disable the program windows, you may pass <code>wxEXEC_NODISABLE</code> flag to prevent this automatic disabling from happening.</p>
<p>For asynchronous execution, however, the return value is the process id and zero value indicates that the command could not be executed. As an added complication, the return value of -1 in this case indicates that we didn't launch a new process, but connected to the running one (this can only happen when using DDE under Windows for command execution). In particular, in this case only, the calling code will not get the notification about process termination.</p>
<p>If <em>callback</em> isn't <span class="literal">NULL</span> and if execution is asynchronous, <a class="el" href="classwx_process.html#aa378b7e705c9191431cad51a81581836" title="It is called when the process with the pid pid finishes.">wxProcess::OnTerminate()</a> will be called when the process finishes. Specifying this parameter also allows you to redirect the standard input and/or output of the process being launched by calling <a class="el" href="classwx_process.html#a9d1fc94d98e373c26dbb128516c2c348" title="Turns on redirection.">wxProcess::Redirect()</a>.</p>
<p>Under Windows, when launching a console process its console is shown by default but hidden if its IO is redirected. Both of these default behaviours may be overridden: if <a class="el" href="group__group__funcmacro__procctrl.html#ggaedcf2109f459315e1a7f2af73ec9b603a6eb92c81a5e49ef172b9d74528be55a0" title="Hide child process console under MSW.">wxEXEC_HIDE_CONSOLE</a> is specified, the console will never be shown. If <a class="el" href="group__group__funcmacro__procctrl.html#ggaedcf2109f459315e1a7f2af73ec9b603a433c517e46d1dd61a5dda1ffeb750552" title="Always show the child process console under MSW.">wxEXEC_SHOW_CONSOLE</a> is used, the console will be shown even if the child process IO is redirected. Neither of these flags affect non-console Windows applications or does anything under the other systems.</p>
<p>Under Unix the flag <code>wxEXEC_MAKE_GROUP_LEADER</code> may be used to ensure that the new process is a group leader (this will create a new session if needed). Calling <a class="el" href="group__group__funcmacro__procctrl.html#gae3a7de5a29e70c77463dd1bc38fb98cf" title="Equivalent to the Unix kill function: send the given signal sig to the process with PID pid...">wxKill()</a> passing wxKILL_CHILDREN will kill this process as well as all of its children (except those which have started their own session). Under MSW, this flag can be used with console processes only and corresponds to the native <code>CREATE_NEW_PROCESS_GROUP</code> flag.</p>
<p>The <code>wxEXEC_NOEVENTS</code> flag prevents processing of any events from taking place while the child process is running. It should be only used for very short-lived processes as otherwise the application windows risk becoming unresponsive from the users point of view. As this flag only makes sense with <code>wxEXEC_SYNC</code>, <code>wxEXEC_BLOCK</code> equal to the sum of both of these flags is provided as a convenience.</p>
<dl class="section note"><dt>Note</dt><dd>Currently <a class="el" href="group__group__funcmacro__procctrl.html#gaa276e9e676e26bafeec3141b73399b33" title="Executes another program in Unix or Windows.">wxExecute()</a> can only be used from the main thread, calling this function from another thread will result in an assert failure in debug build and won't work.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">command</td><td>The command to execute and any parameters to pass to it as a single string, i.e. "emacs file.txt". </td></tr>
    <tr><td class="paramname">flags</td><td>Must include either wxEXEC_ASYNC or wxEXEC_SYNC and can also include wxEXEC_SHOW_CONSOLE, wxEXEC_HIDE_CONSOLE, wxEXEC_MAKE_GROUP_LEADER (in either case) or wxEXEC_NODISABLE and wxEXEC_NOEVENTS or wxEXEC_BLOCK, which is equal to their combination, in wxEXEC_SYNC case. </td></tr>
    <tr><td class="paramname">callback</td><td>An optional pointer to <a class="el" href="classwx_process.html" title="The objects of this class are used in conjunction with the wxExecute() function.">wxProcess</a>. </td></tr>
    <tr><td class="paramname">env</td><td>An optional pointer to additional parameters for the child process, such as its initial working directory and environment variables. This parameter is available in wxWidgets 2.9.2 and later only.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="group__group__funcmacro__procctrl.html#gad7f2f357f592f8c786ab05f516578023" title="Executes a command in an interactive shell window.">wxShell()</a>, <a class="el" href="classwx_process.html" title="The objects of this class are used in conjunction with the wxExecute() function.">wxProcess</a>, <a class="el" href="page_samples.html#page_samples_exec">External Program Execution Sample</a>, <a class="el" href="group__group__funcmacro__misc.html#ga04038d4c78e4c111d018b8f82b2d66c3" title="Opens the document in the application associated with the files of this type.">wxLaunchDefaultApplication()</a>, <a class="el" href="group__group__funcmacro__misc.html#ga3ff36fe489da2a779248b56f283615ca" title="Opens the url in user&#39;s default browser.">wxLaunchDefaultBrowser()</a></dd></dl>
<p>Include file: </p>
<pre class="fragment">#include &lt;wx/utils.h&gt; </pre><p><b>wxPerl Note:</b> In wxPerl this function is called <code>Wx::ExecuteCommand</code>. </p>

</div>
</div>
<a class="anchor" id="ga8116ca17aec4eea74b848f1544805960"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">long wxExecute </td>
          <td>(</td>
          <td class="paramtype">char **&#160;</td>
          <td class="paramname"><em>argv</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>flags</em> = <code><a class="el" href="group__group__funcmacro__procctrl.html#ggaedcf2109f459315e1a7f2af73ec9b603a457bddfa2a7ce4927358680893910cc8">wxEXEC_ASYNC</a></code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classwx_process.html">wxProcess</a> *&#160;</td>
          <td class="paramname"><em>callback</em> = <code>NULL</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structwx_execute_env.html">wxExecuteEnv</a> *&#160;</td>
          <td class="paramname"><em>env</em> = <code>NULL</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This is an overloaded version of wxExecute(const wxString&amp;,int,wxProcess*), please see its documentation for general information. </p>
<p>This version takes an array of values: a command, any number of arguments, terminated by <span class="literal">NULL</span>.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">argv</td><td>The command to execute should be the first element of this array, any additional ones are the command parameters and the array must be terminated with a <span class="literal">NULL</span> pointer. </td></tr>
    <tr><td class="paramname">flags</td><td>Same as for wxExecute(const wxString&amp;,int,wxProcess*) overload. </td></tr>
    <tr><td class="paramname">callback</td><td>An optional pointer to <a class="el" href="classwx_process.html" title="The objects of this class are used in conjunction with the wxExecute() function.">wxProcess</a>. </td></tr>
    <tr><td class="paramname">env</td><td>An optional pointer to additional parameters for the child process, such as its initial working directory and environment variables. This parameter is available in wxWidgets 2.9.2 and later only.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="group__group__funcmacro__procctrl.html#gad7f2f357f592f8c786ab05f516578023" title="Executes a command in an interactive shell window.">wxShell()</a>, <a class="el" href="classwx_process.html" title="The objects of this class are used in conjunction with the wxExecute() function.">wxProcess</a>, <a class="el" href="page_samples.html#page_samples_exec">External Program Execution Sample</a>, <a class="el" href="group__group__funcmacro__misc.html#ga04038d4c78e4c111d018b8f82b2d66c3" title="Opens the document in the application associated with the files of this type.">wxLaunchDefaultApplication()</a>, <a class="el" href="group__group__funcmacro__misc.html#ga3ff36fe489da2a779248b56f283615ca" title="Opens the url in user&#39;s default browser.">wxLaunchDefaultBrowser()</a></dd></dl>
<p>Include file: </p>
<pre class="fragment">#include &lt;wx/utils.h&gt; </pre><p><b>wxPerl Note:</b> In wxPerl this function is called <code>Wx::ExecuteArgs</code>. </p>

</div>
</div>
<a class="anchor" id="gabba679a024d6a4a084fc8d16220c4d7b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">long wxExecute </td>
          <td>(</td>
          <td class="paramtype">wchar_t **&#160;</td>
          <td class="paramname"><em>argv</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>flags</em> = <code><a class="el" href="group__group__funcmacro__procctrl.html#ggaedcf2109f459315e1a7f2af73ec9b603a457bddfa2a7ce4927358680893910cc8">wxEXEC_ASYNC</a></code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classwx_process.html">wxProcess</a> *&#160;</td>
          <td class="paramname"><em>callback</em> = <code>NULL</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structwx_execute_env.html">wxExecuteEnv</a> *&#160;</td>
          <td class="paramname"><em>env</em> = <code>NULL</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="ga8f0c6749817ce450eae22290194c812e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">long wxExecute </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classwx_string.html">wxString</a> &amp;&#160;</td>
          <td class="paramname"><em>command</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classwx_array_string.html">wxArrayString</a> &amp;&#160;</td>
          <td class="paramname"><em>output</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>flags</em> = <code>0</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structwx_execute_env.html">wxExecuteEnv</a> *&#160;</td>
          <td class="paramname"><em>env</em> = <code>NULL</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This is an overloaded version of wxExecute(const wxString&amp;,int,wxProcess*), please see its documentation for general information. </p>
<p>This version can be used to execute a process (always synchronously, the contents of <em>flags</em> is or'd with <code>wxEXEC_SYNC</code>) and capture its output in the array <em>output</em>.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">command</td><td>The command to execute and any parameters to pass to it as a single string. </td></tr>
    <tr><td class="paramname">output</td><td>The string array where the stdout of the executed process is saved. </td></tr>
    <tr><td class="paramname">flags</td><td>Combination of flags to which <a class="el" href="group__group__funcmacro__procctrl.html#ggaedcf2109f459315e1a7f2af73ec9b603a412f75e022e82e7d8415109a6712be36" title="Execute the process synchronously.">wxEXEC_SYNC</a> is always implicitly added. </td></tr>
    <tr><td class="paramname">env</td><td>An optional pointer to additional parameters for the child process, such as its initial working directory and environment variables. This parameter is available in wxWidgets 2.9.2 and later only.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="group__group__funcmacro__procctrl.html#gad7f2f357f592f8c786ab05f516578023" title="Executes a command in an interactive shell window.">wxShell()</a>, <a class="el" href="classwx_process.html" title="The objects of this class are used in conjunction with the wxExecute() function.">wxProcess</a>, <a class="el" href="page_samples.html#page_samples_exec">External Program Execution Sample</a>, <a class="el" href="group__group__funcmacro__misc.html#ga04038d4c78e4c111d018b8f82b2d66c3" title="Opens the document in the application associated with the files of this type.">wxLaunchDefaultApplication()</a>, <a class="el" href="group__group__funcmacro__misc.html#ga3ff36fe489da2a779248b56f283615ca" title="Opens the url in user&#39;s default browser.">wxLaunchDefaultBrowser()</a></dd></dl>
<p>Include file: </p>
<pre class="fragment">#include &lt;wx/utils.h&gt; </pre><p><b>wxPerl Note:</b> This function is called <code>Wx::ExecuteStdout:</code> it only takes the <em>command</em> argument, and returns a 2-element list (<code>status</code>, <code>output</code>), where <code>output</code> in an array reference. </p>

</div>
</div>
<a class="anchor" id="ga481a6f4eb3783d38e022aaca1b6ed757"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">long wxExecute </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classwx_string.html">wxString</a> &amp;&#160;</td>
          <td class="paramname"><em>command</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classwx_array_string.html">wxArrayString</a> &amp;&#160;</td>
          <td class="paramname"><em>output</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classwx_array_string.html">wxArrayString</a> &amp;&#160;</td>
          <td class="paramname"><em>errors</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>flags</em> = <code>0</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structwx_execute_env.html">wxExecuteEnv</a> *&#160;</td>
          <td class="paramname"><em>env</em> = <code>NULL</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This is an overloaded version of wxExecute(const wxString&amp;,int,wxProcess*), please see its documentation for general information. </p>
<p>This version adds the possibility to additionally capture the messages from standard error output in the <em>errors</em> array. As with the above overload capturing standard output only, execution is always synchronous.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">command</td><td>The command to execute and any parameters to pass to it as a single string. </td></tr>
    <tr><td class="paramname">output</td><td>The string array where the stdout of the executed process is saved. </td></tr>
    <tr><td class="paramname">errors</td><td>The string array where the stderr of the executed process is saved. </td></tr>
    <tr><td class="paramname">flags</td><td>Combination of flags to which <a class="el" href="group__group__funcmacro__procctrl.html#ggaedcf2109f459315e1a7f2af73ec9b603a412f75e022e82e7d8415109a6712be36" title="Execute the process synchronously.">wxEXEC_SYNC</a> is always implicitly added. </td></tr>
    <tr><td class="paramname">env</td><td>An optional pointer to additional parameters for the child process, such as its initial working directory and environment variables. This parameter is available in wxWidgets 2.9.2 and later only.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="group__group__funcmacro__procctrl.html#gad7f2f357f592f8c786ab05f516578023" title="Executes a command in an interactive shell window.">wxShell()</a>, <a class="el" href="classwx_process.html" title="The objects of this class are used in conjunction with the wxExecute() function.">wxProcess</a>, <a class="el" href="page_samples.html#page_samples_exec">External Program Execution Sample</a>, <a class="el" href="group__group__funcmacro__misc.html#ga04038d4c78e4c111d018b8f82b2d66c3" title="Opens the document in the application associated with the files of this type.">wxLaunchDefaultApplication()</a>, <a class="el" href="group__group__funcmacro__misc.html#ga3ff36fe489da2a779248b56f283615ca" title="Opens the url in user&#39;s default browser.">wxLaunchDefaultBrowser()</a></dd></dl>
<p>Include file: </p>
<pre class="fragment">#include &lt;wx/utils.h&gt; </pre><p><b>wxPerl Note:</b> This function is called <code>Wx::ExecuteStdoutStderr:</code> it only takes the <em>command</em> argument, and returns a 3-element list (<code>status</code>, <code>output</code>, <code>errors</code>), where <code>output</code> and <code>errors</code> are array references. </p>

</div>
</div>
<a class="anchor" id="ga3770f7ff142dab558f10ae354350874d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void wxExit </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Exits application after calling <a class="el" href="classwx_app_console.html#a5ee60051c92b0b2933258799626a0485" title="Override this member function for any processing which needs to be done as the application is about t...">wxApp::OnExit</a>. </p>
<p>Should only be used in an emergency: normally the top-level frame should be deleted (after deleting all other frames) to terminate the application. See <a class="el" href="classwx_close_event.html" title="This event class contains information about window and session close events.">wxCloseEvent</a> and <a class="el" href="classwx_app.html" title="The wxApp class represents the application itself when wxUSE_GUI=1.">wxApp</a>.</p>
<p>Include file: </p>
<pre class="fragment">#include &lt;wx/app.h&gt; </pre> 
</div>
</div>
<a class="anchor" id="gab50b6a7e83f7a59d4c1d08d52505f8c6"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">unsigned long wxGetProcessId </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns the number uniquely identifying the current process in the system. </p>
<p>If an error occurs, 0 is returned.</p>
<p>Include file: </p>
<pre class="fragment">#include &lt;wx/utils.h&gt; </pre> 
</div>
</div>
<a class="anchor" id="gae3a7de5a29e70c77463dd1bc38fb98cf"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int wxKill </td>
          <td>(</td>
          <td class="paramtype">long&#160;</td>
          <td class="paramname"><em>pid</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utils_8h.html#a20679c5ff68fdf39b9ea552b0d94c314">wxSignal</a>&#160;</td>
          <td class="paramname"><em>sig</em> = <code><a class="el" href="utils_8h.html#a20679c5ff68fdf39b9ea552b0d94c314ae53272781ce284433c1aed7d4457b951">wxSIGTERM</a></code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utils_8h.html#af9655b6ab587e0a65ad6f63eb32d814f">wxKillError</a> *&#160;</td>
          <td class="paramname"><em>rc</em> = <code>NULL</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>flags</em> = <code><a class="el" href="utils_8h.html#a03a0fc5862f90668a6d4cf968445b272a6daac111081c4e551647bd00c898c42c">wxKILL_NOCHILDREN</a></code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Equivalent to the Unix kill function: send the given signal <em>sig</em> to the process with PID <em>pid</em>. </p>
<p>The valid signal values are:</p>
<div class="fragment"><div class="line"><span class="keyword">enum</span> <a class="code" href="utils_8h.html#a20679c5ff68fdf39b9ea552b0d94c314" title="Signal constants used by wxProcess.">wxSignal</a></div>
<div class="line">{</div>
<div class="line">    <a class="code" href="utils_8h.html#a20679c5ff68fdf39b9ea552b0d94c314ae642607b5b7e709b6e4b87039d25ca6a" title="verify if the process exists under Unix">wxSIGNONE</a> = 0, <span class="comment">// verify if the process exists under Unix</span></div>
<div class="line">    <a class="code" href="utils_8h.html#a20679c5ff68fdf39b9ea552b0d94c314afb13d3ae732f5e9ec0e07dfd85d86a9c">wxSIGHUP</a>,</div>
<div class="line">    <a class="code" href="utils_8h.html#a20679c5ff68fdf39b9ea552b0d94c314af4562905d83597f381104c16482cbb6c">wxSIGINT</a>,</div>
<div class="line">    <a class="code" href="utils_8h.html#a20679c5ff68fdf39b9ea552b0d94c314a6fa9706c853b48e2f1b3669fe468284d">wxSIGQUIT</a>,</div>
<div class="line">    <a class="code" href="utils_8h.html#a20679c5ff68fdf39b9ea552b0d94c314a0b70ce38f179007b68def47b052a3dd8">wxSIGILL</a>,</div>
<div class="line">    <a class="code" href="utils_8h.html#a20679c5ff68fdf39b9ea552b0d94c314a6d90c2a96bef2ee77a158abaf77778f6">wxSIGTRAP</a>,</div>
<div class="line">    <a class="code" href="utils_8h.html#a20679c5ff68fdf39b9ea552b0d94c314a9643a6b5f988df535c6bc623f6d153fb">wxSIGABRT</a>,</div>
<div class="line">    <a class="code" href="utils_8h.html#a20679c5ff68fdf39b9ea552b0d94c314aa6c621ec07fdf10677acee295e3c8f85">wxSIGEMT</a>,</div>
<div class="line">    <a class="code" href="utils_8h.html#a20679c5ff68fdf39b9ea552b0d94c314a655d4b96c0ccd68a189cb644b22a4ce1">wxSIGFPE</a>,</div>
<div class="line">    <a class="code" href="utils_8h.html#a20679c5ff68fdf39b9ea552b0d94c314af4b0ffd5af303d0794f9ecd58ed9a2b0" title="forcefully kill, dangerous!">wxSIGKILL</a>,     <span class="comment">// forcefully kill, dangerous!</span></div>
<div class="line">    <a class="code" href="utils_8h.html#a20679c5ff68fdf39b9ea552b0d94c314a958b8241790be6e7be8fb6074427770b">wxSIGBUS</a>,</div>
<div class="line">    <a class="code" href="utils_8h.html#a20679c5ff68fdf39b9ea552b0d94c314a9fc992c7c8eddd3105d1c3c080a4143d">wxSIGSEGV</a>,</div>
<div class="line">    <a class="code" href="utils_8h.html#a20679c5ff68fdf39b9ea552b0d94c314aa7e7ee41dd3387d774b014d4c0b45f53">wxSIGSYS</a>,</div>
<div class="line">    <a class="code" href="utils_8h.html#a20679c5ff68fdf39b9ea552b0d94c314a13cdc0f322dd573168401981112be24a">wxSIGPIPE</a>,</div>
<div class="line">    <a class="code" href="utils_8h.html#a20679c5ff68fdf39b9ea552b0d94c314acd9f5bb5cb3c04ca790eaf16f65adf90">wxSIGALRM</a>,</div>
<div class="line">    <a class="code" href="utils_8h.html#a20679c5ff68fdf39b9ea552b0d94c314ae53272781ce284433c1aed7d4457b951" title="terminate the process gently">wxSIGTERM</a>      <span class="comment">// terminate the process gently</span></div>
<div class="line">};</div>
</div><!-- fragment --><p><code>wxSIGNONE</code>, <code>wxSIGKILL</code> and <code>wxSIGTERM</code> have the same meaning under both Unix and Windows but all the other signals are equivalent to <code>wxSIGTERM</code> under Windows. Moreover, under Windows, <code>wxSIGTERM</code> is implemented by posting a message to the application window, so it only works if the application does have windows. If it doesn't, as is notably always the case for the console applications, you need to use <code>wxSIGKILL</code> to actually kill the process. Of course, this doesn't allow the process to shut down gracefully and so should be avoided if possible.</p>
<p>Returns 0 on success, -1 on failure. If the <em>rc</em> parameter is not <span class="literal">NULL</span>, it will be filled with a value from the <code>wxKillError</code> enum:</p>
<div class="fragment"><div class="line"><span class="keyword">enum</span> <a class="code" href="utils_8h.html#af9655b6ab587e0a65ad6f63eb32d814f" title="Return values for wxProcess::Kill.">wxKillError</a></div>
<div class="line">{</div>
<div class="line">    <a class="code" href="utils_8h.html#af9655b6ab587e0a65ad6f63eb32d814fa8b3d0f6e88641bade2f21b356f534116" title="no error">wxKILL_OK</a>,            <span class="comment">// no error</span></div>
<div class="line">    <a class="code" href="utils_8h.html#af9655b6ab587e0a65ad6f63eb32d814fa32f4fc9699e037907b7db08cb28588b4" title="no such signal">wxKILL_BAD_SIGNAL</a>,    <span class="comment">// no such signal</span></div>
<div class="line">    <a class="code" href="utils_8h.html#af9655b6ab587e0a65ad6f63eb32d814fab8516295327be51026247adaa82ef467" title="permission denied">wxKILL_ACCESS_DENIED</a>, <span class="comment">// permission denied</span></div>
<div class="line">    <a class="code" href="utils_8h.html#af9655b6ab587e0a65ad6f63eb32d814fa7cc78accfb5dba7833929628c8206c1e" title="no such process">wxKILL_NO_PROCESS</a>,    <span class="comment">// no such process</span></div>
<div class="line">    <a class="code" href="utils_8h.html#af9655b6ab587e0a65ad6f63eb32d814fa416b6f81586bd58881566d42fad847f9" title="another, unspecified error">wxKILL_ERROR</a>          <span class="comment">// another, unspecified error</span></div>
<div class="line">};</div>
</div><!-- fragment --><p>The <em>flags</em> parameter can be wxKILL_NOCHILDREN (the default), or wxKILL_CHILDREN, in which case the child processes of this process will be killed too. Note that under Unix, for wxKILL_CHILDREN to work you should have created the process by passing wxEXEC_MAKE_GROUP_LEADER to <a class="el" href="group__group__funcmacro__procctrl.html#gaa276e9e676e26bafeec3141b73399b33" title="Executes another program in Unix or Windows.">wxExecute()</a>.</p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classwx_process.html#a6b3ff71a9d026d93600add4cbb72a172" title="Send the specified signal to the given process.">wxProcess::Kill()</a>, <a class="el" href="classwx_process.html#a3c81aa4ef5b6b76018e245f0b004f51b" title="Returns true if the given process exists in the system.">wxProcess::Exists()</a>, <a class="el" href="page_samples.html#page_samples_exec">External Program Execution Sample</a></dd></dl>
<p>Include file: </p>
<pre class="fragment">#include &lt;wx/utils.h&gt; </pre> 
</div>
</div>
<a class="anchor" id="gad7f2f357f592f8c786ab05f516578023"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool wxShell </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classwx_string.html">wxString</a> &amp;&#160;</td>
          <td class="paramname"><em>command</em> = <code><a class="el" href="interface_2wx_2string_8h.html#a9a321d587166a30017b608dd2d234033">wxEmptyString</a></code></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Executes a command in an interactive shell window. </p>
<p>If no command is specified, then just the shell is spawned.</p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="group__group__funcmacro__procctrl.html#gaa276e9e676e26bafeec3141b73399b33" title="Executes another program in Unix or Windows.">wxExecute()</a>, <a class="el" href="page_samples.html#page_samples_exec">External Program Execution Sample</a></dd></dl>
<p>Include file: </p>
<pre class="fragment">#include &lt;wx/utils.h&gt; </pre> 
</div>
</div>
<a class="anchor" id="ga3177c2a68564921806525f8fefa7e5c8"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool wxShutdown </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>flags</em> = <code><a class="el" href="utils_8h.html#abacc7b19c541b5353890c078f734d291a6e11ecb7aca7a0d1c19a83ac87693a25">wxSHUTDOWN_POWEROFF</a></code></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function shuts down or reboots the computer depending on the value of the <em>flags</em>. </p>
<dl class="section note"><dt>Note</dt><dd>Note that performing the shutdown requires the corresponding access rights (superuser under Unix, SE_SHUTDOWN privilege under Windows NT) and that this function is only implemented under Unix and MSW.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">flags</td><td>One of <code>wxSHUTDOWN_POWEROFF</code>, <code>wxSHUTDOWN_REBOOT</code> or <code>wxSHUTDOWN_LOGOFF</code> (currently implemented only for MSW) possibly combined with <code>wxSHUTDOWN_FORCE</code> which forces shutdown under MSW by forcefully terminating all the applications. As doing this can result in a data loss, this flag shouldn't be used unless really necessary.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><span class="literal">true</span> on success, <span class="literal">false</span> if an error occurred.</dd></dl>
<p>Include file: </p>
<pre class="fragment">#include &lt;wx/utils.h&gt; </pre> 
</div>
</div>
</div><!-- contents -->

<address class="footer">
	<small>
		Generated on Thu Nov 27 2014 13:46:43 for wxWidgets by <a href="http://www.doxygen.org/index.html" target="_new">Doxygen</a> 1.8.2
	</small>
</address>
<script src="wxwidgets.js" type="text/javascript"></script>
</div><!-- #page_container -->
</body>
</html>