Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • D dhcp
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 128
    • Issues 128
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 13
    • Merge requests 13
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • ISC Open Source ProjectsISC Open Source Projects
  • dhcp
  • Merge requests
  • !69

Implement the generate() operator

  • Review changes

  • Download
  • Email patches
  • Plain diff
Open Xavier G. requested to merge xavierg/dhcp:136-implement-the-generate-operator into master Nov 14, 2020
  • Overview 0
  • Commits 11
  • Pipelines 0
  • Changes 11

Implement the generate() operator as part of dhcp-eval. generate() is similar to execute() in that it executes an external program. However, unlike execute(), generate() is a data expression: it reads up to 1024 bytes from the standard output of the resulting child process and makes them available as a C string. It can therefore be combined with substring(), concat() and other similar operators for maximum flexibility. Like execute(), generate() can be disabled through ./configure --disable-generate.

It is roughly the same code as the patch submitted two years ago on the former bugtracker, except it was split in separate commits, thus making it much easier to review. Additionally, exec_read() now prevents child processes from turning into zombie processes and the configure script was regenerated.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: 136-implement-the-generate-operator