~cloud-init-dev/cloud-init/trunk

« back to all changes in this revision

Viewing changes to cloudinit/util.py

  • Committer: Scott Moser
  • Date: 2014-09-16 00:27:31 UTC
  • mfrom: (1000.3.3 bug-1338614)
  • Revision ID: smoser@ubuntu.com-20140916002731-cvnbqhw04reaf8t5
resizefs: fix backgrounded resizing

add kwargs to fork_cb, and utilize that to call log_time and pass through
the provided args to resize_cmd.

Show diffs side-by-side

added added

removed removed

Lines of Context:
191
191
    return fh
192
192
 
193
193
 
194
 
def fork_cb(child_cb, *args):
 
194
def fork_cb(child_cb, *args, **kwargs):
195
195
    fid = os.fork()
196
196
    if fid == 0:
197
197
        try:
198
 
            child_cb(*args)
 
198
            child_cb(*args, **kwargs)
199
199
            os._exit(0)
200
200
        except:
201
201
            logexc(LOG, "Failed forking and calling callback %s",