App-Context

 view release on metacpan or  search on metacpan

lib/App/Context.pm  view on Meta::CPAN

a child process. 

Currently, this is primarily for database connections.
For most databases, the child needs its own connection.

=cut

sub shutdown_unshareable_resources {
    my $self = shift;
    my ($conf, $repdef, $repname, $instance);
    my ($class, $method, $args, $argidx, $repcache);

    $self->dbgprint("Context->shutdown_unshareable_resources()")
        if ($App::DEBUG && $self->dbg(1));

    $repcache = $self->{session}{cache}{Repository};
    if (defined $repcache && ref($repcache) eq "HASH") {
        foreach $repname (keys %$repcache) {
            $instance = $repcache->{$repname};
            $instance->_shutdown_unshareable_resources();
            delete $repcache->{$repname};

lib/App/Context.pm  view on Meta::CPAN


    Sample Usage: 

    $self->shutdown();

=cut

sub shutdown {
    my ($self, $end_cd) = @_;
    my ($conf, $repdef, $repname, $instance);
    my ($class, $method, $args, $argidx, $repcache);

    if (!$self->{shutdown_complete}) {
        my $options  = $self->{options};
        my $profiler = $options->{"app.Context.profiler"};
        if ($profiler) {
            $self->profile_stop("main");
            $self->finish_profiler_log($end_cd);
        }

        $self->dbgprint("Context->shutdown()")

lib/App/Context.pm  view on Meta::CPAN

            }
        }
        close(App::Context::FILE);
    }
    return($info);
}

# /proc/$$/status
# Name:   ksh
# State:  S (sleeping)
# Tgid:   29147
# Pid:    29147
# PPid:   29146
# TracerPid:      0
# Uid:    102     102     102     102
# Gid:    205     205     205     205
# FDSize: 32
# Groups: 205 201 202 214 3000 203 217
# VmSize:     1624 kB
# VmLck:         0 kB
# VmRSS:       608 kB

lib/App/Context.pm  view on Meta::CPAN

# 185030 316        14024   1          3          687       715       14         0          0
# 0      1792102651 4403200 361        4294967295 134512640 135217536 3221217344 3221216648 1074425592
# 0      65536      3686404 1266761467 3222400107 0         0         17         2
#   1. pid - Process id
#   2. comm - The executable filename
#   3. state - R (running), S(sleeping interruptable), D(sleeping), Z(zombie), or T(stopped on a signal).
#   4. ppid - Parent process ID
#   5. pgrp - Process group ID
#   6. session - The process session ID.
#   7. tty - The tty the process is using
#   8. tpgid - The process group ID of the owning process of the tty the current process is connected to.
#   9. flags - Process flags, currently with bugs
#  10. minflt - Minor faults the process has made
#  11. cminflt - Minor faults the process and its children have made.
#  12. majflt
#  13. cmajflt
#  14. utime - The number of jiffies (processor time) that this process has been scheduled in user mode
#  15. stime - in kernel mode
#  16. cutime - This process and its children in user mode
#  17. cstime - in kernel mode
#  18. counter - The maximum time of this processes next time slice.

lib/App/Context/NetServer.pm  view on Meta::CPAN

#  listen            \d+                      SOMAXCONN
#
#  reverse_lookups   1                        undef
#  allow             /regex/                  none
#  deny              /regex/                  none
#
#  ## daemonization parameters
#  pid_file          "filename"               undef
#  chroot            "directory"              undef
#  user              (uid|username)           "nobody"
#  group             (gid|group)              "nobody"
#  background        1                        undef
#  setsid            1                        undef
#
#  no_close_by_child (1|undef)                undef

sub dispatch_events {
    my ($self) = @_;

    my $options = $self->options();
    my @options = qw(

lib/App/adminguide/cvs.pod  view on Meta::CPAN

and that did the trick, as verified by

  rpm -q cvs
  cvs --version

If that had not worked, I would have compiled my own version from
sources, but I would have to be sure to use ./configure --prefix=/usr
so that the binaries would overwrite the installed binaries rather
than creating another version in /usr/local.

Somewhere else I read that I need to set the setgid bit on the
cvs binary.

  chmod 2755 /usr/bin/cvs

=head2 Users and Groups

We use NIS, so I verified that we have both the cvs user and group
defined.

  ypcat passwd | grep cvs

lib/App/datetime.pod  view on Meta::CPAN

how it is used.
It represents the number of non-leap seconds since 
January 1, 1970 UTC (the "Epoch" at GMT).  The following internal
Perl function gets the current time.

 $current_time = time;
 $current_time = time();

Other Perl functions that return this "datetime" integer are

 ($dev, $ino, $mode, $nlink, $uid, $gid, $redev, $size,
  $atime, $mtime, $ctime, $blksize, $blocks) = stat($filename);
 ($dev, $ino, $mode, $nlink, $uid, $gid, $redev, $size,
  $atime, $mtime, $ctime, $blksize, $blocks) = lstat($filename);

where $atime, $mtime, and $ctime are the same kind of integers,
representing the access time, modification time, and change time
of a file.

These $time values may be converted to human-readable
form using the following internal perl functions.
(See the "perlfunc" man page for more information.)

lib/App/installguide.pod  view on Meta::CPAN


All of these directories will have their own self-contained installation
of software.  Named versions (i.e. "test", "qa", "prod") are simply
symbolic links to the particular version to which they currently apply.

In your chosen development directory, you should set the permissions
to allow access to be granted by group.

  chgrp -R spadkins /usr/mycompany/spadkins  # all files and dirs owned by group
  chmod 775 `find /usr/mycompany/spadkins -type d -print` # dirs writable by the group
  chmod g+s `find /usr/mycompany/spadkins -type d -print` # setgid bit keeps files in the group

Within each directory, you should create a default set of subdirectories.

  cd /usr/mycompany/spadkins
  mkdir src lib bin man etc include src/tar

You should set up in your ".profile" some appropriate variables.

  PREFIX=/usr/mycompany/spadkins; export PREFIX
  PATH=$PREFIX/bin:$PATH; export PATH

lib/App/installguide.pod.ota  view on Meta::CPAN


All of these directories will have their own self-contained installation
of software.  Named versions (i.e. "test", "qa", "prod") are simply
symbolic links to the particular version to which they currently apply.

In your chosen development directory, you should set the permissions
to allow access to be granted by group.

  chgrp -R spadkins /usr/mycompany/spadkins  # all files and dirs owned by group
  chmod 775 `find /usr/mycompany/spadkins -type d -print` # dirs writable by the group
  chmod g+s `find /usr/mycompany/spadkins -type d -print` # setgid bit keeps files in the group

Within each directory, you should create a default set of subdirectories.

  cd /usr/mycompany/spadkins
  mkdir src lib bin man etc include src/tar

You should set up in your ".profile" some appropriate variables.

  PREFIX=/usr/mycompany/spadkins; export PREFIX
  PATH=$PREFIX/bin:$PATH; export PATH



( run in 0.638 second using v1.01-cache-2.11-cpan-ceb78f64989 )