AnonSec Shell
Server IP : 185.86.78.101  /  Your IP : 216.73.216.124
Web Server : Apache
System : Linux 675867-vds-valikoshka1996.gmhost.pp.ua 5.4.0-150-generic #167-Ubuntu SMP Mon May 15 17:35:05 UTC 2023 x86_64
User : www ( 1000)
PHP Version : 7.4.33
Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /usr/share/perl5/Debconf/FrontEnd/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     

Current File : /usr/share/perl5/Debconf/FrontEnd/Kde.pm
package Debconf::FrontEnd::Kde;

use strict;
use warnings;
use IO::Handle;
use Fcntl;
use POSIX ":sys_wait_h";
use Debconf::Config;
use base "Debconf::FrontEnd::Passthrough";



sub clear_fd_cloexec {
	my $fh = shift;
	my $flags;
	$flags = $fh->fcntl(F_GETFD, 0);
	$flags &= ~FD_CLOEXEC;
	$fh->fcntl(F_SETFD, $flags);
}


sub init {
	my $this = shift;

	$this->need_tty(0);

	pipe my $dc2hp_readfh, my $dc2hp_writefh;
	pipe my $hp2dc_readfh, my $hp2dc_writefh;

	my $helper_pid = fork();
	if (!defined $helper_pid) {
		die "Unable to fork for execution of debconf-kde-helper: $!\n";
	} elsif ($helper_pid == 0) {
		close $hp2dc_readfh;
		close $dc2hp_writefh;
		clear_fd_cloexec($dc2hp_readfh);
		clear_fd_cloexec($hp2dc_writefh);
		my $debug = Debconf::Config->debug;
		local $ENV{QT_LOGGING_RULES} = 'org.kde.debconf.debug=false'
			unless $debug && 'kde' =~ /$debug/;
		my $fds = sprintf("%d,%d", $dc2hp_readfh->fileno(), $hp2dc_writefh->fileno());
		if (!exec("debconf-kde-helper", "--fifo-fds=$fds")) {
			print STDERR "Unable to execute debconf-kde-helper - is debconf-kde-helper installed?";
			exit(10);
		}
	}

	close $dc2hp_readfh;
	close $hp2dc_writefh;

	$this->{kde_helper_pid} = $helper_pid;
	$this->{readfh} = $hp2dc_readfh;
	$this->{writefh} = $dc2hp_writefh;
	$this->SUPER::init();

	my $timeout = 15;
	my $tag = $this->talk_with_timeout($timeout, "X_PING");
	unless (defined $tag && $tag == 0) {
		close $hp2dc_readfh;
		close $dc2hp_writefh;
		if (waitpid($helper_pid, WNOHANG) == $helper_pid) {
			die "debconf-kde-helper terminated abnormally (exit status: " . WEXITSTATUS($?) . ")\n";
		} elsif (kill(0, $helper_pid) == 1) {
			kill 9, $helper_pid;
			waitpid($helper_pid, 0);
		}
		if (defined $tag) {
			die "debconf-kde-helper failed to respond to ping. Response was $tag\n";
		} else {
			die "debconf-kde-helper did not respond to ping in $timeout seconds\n";
		}
	}
}


sub shutdown {
	my $this = shift;
	$this->SUPER::shutdown();
	if (defined $this->{kde_helper_pid}) {
	    waitpid $this->{kde_helper_pid}, 0;
		delete $this->{kde_helper_pid};
	}
}


1;

Anon7 - 2022
AnonSec Team