… | |
… | |
1364 | Works like the combination of the C<fork>/C<exec> builtins, which executes |
1364 | Works like the combination of the C<fork>/C<exec> builtins, which executes |
1365 | ("starts") programs in the background. This function takes care of setting |
1365 | ("starts") programs in the background. This function takes care of setting |
1366 | the user environment before exec'ing the command (e.g. C<PATH>) and should |
1366 | the user environment before exec'ing the command (e.g. C<PATH>) and should |
1367 | be preferred over explicit calls to C<exec> or C<system>. |
1367 | be preferred over explicit calls to C<exec> or C<system>. |
1368 | |
1368 | |
|
|
1369 | It also sets the C<URXVT_EXT_WINDOWID> environment variable to the window |
|
|
1370 | ID of the terminal (C<< $self->parent >>), similar to the C<WINDOWID> |
|
|
1371 | variable set for the process spawned inside the terminal. |
|
|
1372 | |
1369 | Returns the pid of the subprocess or C<undef> on error. |
1373 | Returns the pid of the subprocess or C<undef> on error. |
1370 | |
1374 | |
1371 | =cut |
1375 | =cut |
1372 | |
1376 | |
1373 | sub exec_async { |
1377 | sub exec_async { |
… | |
… | |
1376 | my $pid = fork; |
1380 | my $pid = fork; |
1377 | |
1381 | |
1378 | return $pid |
1382 | return $pid |
1379 | if !defined $pid or $pid; |
1383 | if !defined $pid or $pid; |
1380 | |
1384 | |
|
|
1385 | %ENV = ( |
1381 | %ENV = %{ $self->env }; |
1386 | %{ $self->env }, |
|
|
1387 | URXVT_EXT_WINDOWID => $self->parent, |
|
|
1388 | ); |
1382 | |
1389 | |
1383 | exec @_; |
1390 | exec @_; |
1384 | urxvt::_exit 255; |
1391 | urxvt::_exit 255; |
1385 | } |
1392 | } |
1386 | |
1393 | |
… | |
… | |
2014 | $offset / $self->{ncol} + $self->{beg}, |
2021 | $offset / $self->{ncol} + $self->{beg}, |
2015 | $offset % $self->{ncol} |
2022 | $offset % $self->{ncol} |
2016 | ) |
2023 | ) |
2017 | } |
2024 | } |
2018 | |
2025 | |
2019 | =item $text = $term->special_encode $string |
2026 | =item $text = $term->special_encode ($string) |
2020 | |
2027 | |
2021 | Converts a perl string into the special encoding used by rxvt-unicode, |
2028 | Converts a perl string into the special encoding used by rxvt-unicode, |
2022 | where one character corresponds to one screen cell. See |
2029 | where one character corresponds to one screen cell. See |
2023 | C<< $term->ROW_t >> for details. |
2030 | C<< $term->ROW_t >> for details. |
2024 | |
2031 | |
2025 | =item $string = $term->special_decode $text |
2032 | =item $string = $term->special_decode ($text) |
2026 | |
2033 | |
2027 | Converts rxvt-unicode's text representation into a perl string. See |
2034 | Converts rxvt-unicode's text representation into a perl string. See |
2028 | C<< $term->ROW_t >> for details. |
2035 | C<< $term->ROW_t >> for details. |
2029 | |
2036 | |
2030 | =item $success = $term->grab_button ($button, $modifiermask[, $window = $term->vt]) |
2037 | =item $success = $term->grab_button ($button, $modifiermask[, $window = $term->vt]) |