Spec-Zone .ru
спецификации, руководства, описания, API
Spec-Zone .ru
спецификации, руководства, описания, API
Библиотека разработчика Mac Разработчик
Поиск

 

Эта страница руководства для  версии 10.9 Mac OS X

Если Вы выполняете различную версию  Mac OS X, просматриваете документацию локально:

Читать страницы руководства

Страницы руководства предназначаются как справочник для людей, уже понимающих технологию.

  • Чтобы изучить, как руководство организовано или узнать о синтаксисе команды, прочитайте страницу руководства для страниц справочника (5).

  • Для получения дополнительной информации об этой технологии, ищите другую документацию в Библиотеке Разработчика Apple.

  • Для получения общей информации о записи сценариев оболочки, считайте Shell, Пишущий сценарий Учебника для начинающих.




notifyutil(1)             BSD General Commands Manual            notifyutil(1)

NAME
     notifyutil -- notification command line utility

SYNOPSIS
     notifyutil [-q] [-v] [-z msec] [-M] [-R] [command ...]

DESCRIPTION
     notifyutil is a command-line utility for interacting with the notify(3) notification system and the
     notifyd(8) server.  It may be used to post notifications, detect and report notifications, and to exam-ine examine
     ine and set the state values associated with notification keys.

     If notifyutil is used to monitor one or more notification keys, it prints the notification key when the
     corresponding notification is received.  The -v (verbose) and -q (quiet) flags, if specified, modify
     the output behavior.

     The -v flag causes notifyutil to print a time stamp, the notification key, the current state value for
     that key, and the type of the notification (port, file, etc).  The -q flag supresses any output except
     for state values fetched following a -g command.

     Commands listed in the table below are processed in left to right order from the command line.

           -p key       Post a notification for key.
           -w key       Register for key and wait forever for notifications.
           -# key       Register for key and wait for # (an integer) notifications.
                        E.g. -1 key waits for a single notification.
           -g key       Get state value for key.
           -s key val   Set state value for key.
           -port        Use mach port notifications for subsequent -w or -# registrations.
                        This is the default registration type.
           -file        Use file descriptor notifications for subsequent registrations.
           -check       Use shared memory notifications for subsequent registrations.
           -signal [#]  Use signal notifications for subsequent registrations.
                        Signal 1 (HUP) is the default, but an alternate signal may be specified.
           -dispatch    Use dispatch for subsequent registrations.

     When invoked with any combination of -w and -# actions, notifyutil registers for notification for the
     specified key(s).  If any key is given with a -w action, notifyutil runs until interrupted with Con-trol-C. Control-C.
     trol-C.  If all registrations are invoked with -#, the program continues to run until the corresponding
     number of notifications for each key have been received.

     By default, notifyutil uses mach port registration (using notify_register_mach_port()) for keys given
     with a -w or -# flag.  The -file command causes notifyutil to use notify_register_file_descriptor() for
     any subsequent -w or -# registrations.  Similarly, -check causes notifyutil to use
     notify_register_check() for subsequent registrations, -signal switches to notify_register_signal(), and
     -dispatch causes it to use notify_register_dispatch() for subsequent registrations.

     If any registrations are made following the use of the -check command, notifyutil will start a timer
     and check for shared memory notifications every 100 milliseconds.  An alternate timer value may be set
     following the -z flag.

     The -M flag causes notifyutil to use multiplex all notifications over a single mach connection with
     notifyd.  Notifications (except shared memory notifications) are received and redistributed by a dis-patch dispatch
     patch handler.

     The -R flag causes notifyutil to regenerate all its registrations in the unlikely event that notifyd
     restarts.

     Note that a notification key and its associated state variable only exist when there are one or more
     current registrations for that key.  Setting the state for a key that has no registrations has no
     effect.  Thus the command

           notifyutil -s foo.bar 123 -g foo.bar

     will print

           foo.bar 0

     unless foo.bar is registered by some other process.  However, the command

           notifyutil -w foo.bar -s foo.bar 123 -g foo.bar

     prints

           foo.bar 123

     since the ``-w foo.bar'' registration ensures the key and its state variable exist before the value is
     set, and continue to exist when the value is fetched.

SEE ALSO
     notify(3), notifyd(8)

Mac OS X                       November 4, 2011                       Mac OS X

Сообщение о проблемах

Способ сообщить о проблеме с этой страницей руководства зависит от типа проблемы:

Ошибки содержания
Ошибки отчета в содержании этой документации со ссылками на отзыв ниже.
Отчеты об ошибках
Сообщите об ошибках в функциональности описанного инструмента или API через Генератор отчетов Ошибки.
Форматирование проблем
Отчет, форматирующий ошибки в интерактивной версии этих страниц со ссылками на отзыв ниже.