ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/urxvt.pm
(Generate patch)

Comparing rxvt-unicode/src/urxvt.pm (file contents):
Revision 1.270 by root, Fri Nov 26 18:49:47 2021 UTC vs.
Revision 1.272 by root, Thu Dec 29 01:10:08 2022 UTC

1364Works like the combination of the C<fork>/C<exec> builtins, which executes 1364Works 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
1366the user environment before exec'ing the command (e.g. C<PATH>) and should 1366the user environment before exec'ing the command (e.g. C<PATH>) and should
1367be preferred over explicit calls to C<exec> or C<system>. 1367be preferred over explicit calls to C<exec> or C<system>.
1368 1368
1369It also sets the C<URXVT_EXT_WINDOWID> environment variable to the window
1370ID of the terminal (C<< $self->parent >>), similar to the C<WINDOWID>
1371variable set for the process spawned inside the terminal.
1372
1369Returns the pid of the subprocess or C<undef> on error. 1373Returns the pid of the subprocess or C<undef> on error.
1370 1374
1371=cut 1375=cut
1372 1376
1373sub exec_async { 1377sub 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
2021Converts a perl string into the special encoding used by rxvt-unicode, 2028Converts a perl string into the special encoding used by rxvt-unicode,
2022where one character corresponds to one screen cell. See 2029where one character corresponds to one screen cell. See
2023C<< $term->ROW_t >> for details. 2030C<< $term->ROW_t >> for details.
2024 2031
2025=item $string = $term->special_decode $text 2032=item $string = $term->special_decode ($text)
2026 2033
2027Converts rxvt-unicode's text representation into a perl string. See 2034Converts rxvt-unicode's text representation into a perl string. See
2028C<< $term->ROW_t >> for details. 2035C<< $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])

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines